recursive descent. JSONPath borrows this syntax from E4X.
*
wildcard. All objects/elements regardless their names.
[]
subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator.
?()
applies a filter (script) expression.
()
script expression, using the underlying script engine.
JSONPath TEST CASES
1. Select the document node$.*2. Select the 'employees' element$.employees3. Select all 'employee' elements that are direct children of the 'employees' element.$.employees.employee4. Select all 'id' elements regardless of their positions in the document.$.employees.employee['*'].id5. Select the 'id' attributes of the 'employee' elements with their positions in the document.$.employees.employee[1].id