Skip to main content
Version: 3.7.0

JsonPath

JSONPath equips JSON documents with parsing capabilities, allowing you to conveniently locate nodes and extract desired data. It serves as the JSON equivalent of XPath.

How to write JSONPath?

JsonPathExample
$Root element of the document
--
@Current element
.or []Child element operator
..Recursive descent, matches all child elements
*Wildcard, matches all child elements
[]Subscript operator, retrieves elements by index.JSONPath indices start at 0
`[,]
[start:end :step]Data slice operation (not supported in XPath)
?()Filter expression
()Script expression, uses the underlying scripting engine

Example

JSONPathDescription1 JSONPathDescription2