Child Operator
The RecordPath language is structured in such a way that we are able to easily reference fields of the outer-most Record, or fields of a child Record, or descendant Record. To accomplish this, we separate the names of the children with a slash character (/
), which we refer to as the child
operator. For example, let's assume that we have a Record that is made up of two fields: name
and details
. Also, assume that details
is a field that is itself a Record and has two Fields: identifier
and address
. Further, let's consider that address
is itself a Record that contains 5 fields: number
, street
, city
, state
, and zip
. An example, written here in JSON for illustrative purposes may look like this:
{
"name": "John Doe",
"details": {
"identifier": 100,
"address": {
"number": "123",
"street": "5th Avenue",
"city": "New York",
"state": "NY",
"zip": "10020"
}
}
}
We can reference the zip
field by using the RecordPath: /details/address/zip
. This tells us that we want to use the details
field of the "root" Record. We then want to reference the address
field of the child Record and the zip
field of that Record.