Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

XPathJSONPathDescription
/$The root object.
.@The current object.
/.Child operator.
//..Recursive descent. JSONPath borrows this syntax from E4X.
**Wildcard. All objects/elements regardless their names.
[][]Subscript operator.
| [,]Union operator in XPath results in a combination of node sets. JSONPath allows alternate names or array indices as a set.
n/a[start:end:step]Array slice operator.
[]?()Applies a filter (script) expression.
n/a()KRL predicate expression.

Note that there are differences in how the subscript operator works in XPath and JSONPath. Square brackets in XPath expressions always operate on the node set resulting from the previous path fragment. Indices always start at 1. In contrast, JSONPath square brackets operate on the object or array addressed by the previous path fragment. Indices always start at 0.

...