This simple Snippet allows you to get a single column value from any database object you have generated a class/map for in xPDO. For example, say I have a package called mystuff with a class titled MyClass. This class represents a table with two columns, an id primary key field, and a name field. I can then use getValue to return the name field of a record in the MyClass table (assuming it’s package has been registered in MODX via another Snippet, Plugin, or by registering it in the extension_packages System Setting), e.g.
[[getValue? &class=`mystuff.MyClass` &field=`name` &where=`{"id":1}` &default=`No value found.`]]
You can also use it with any core MODX classes, e.g. to get the class_key of a specific modResource you might do something like this:
[[getValue? &class=`modResource` &field=`class_key` &where=`{"alias":"foo", "context_key":"web", "parent":0}` &default=`No value found.`]]