Skip to main content

$$jsonpath

Query a JSON document using JSONPath

Usage​

{ 
"$$jsonpath": /* Object to query */,
"path": /* string */,
"options": ["SUPPRESS_EXCEPTIONS"] /* string[] */
}
"$$jsonpath(<path>,[options]):{input}"
note

Concrete values in the usage example are default values.

Returns​

object

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryobjectYesObject to query
pathstringYesJSONPath expression
optionsstring[]["SUPPRESS_EXCEPTIONS"]Configurations for the resolver, A list of options by jayway

Examples​

Input

Definition

Output

{
"path": "$.path"
}
"$$jsonpath($.path):$"
"$.path"
{
"arr": [
null,
"boo"
]
}
"$$jsonpath('\\\\$.arr[1]'):$"
"boo"
[
{
"id": 1,
"active": true
},
{
"id": 3,
"active": false
},
{
"id": 4,
"active": true
},
{
"id": 5,
"active": false
}
]
"$$jsonpath('\\\\$[?(@.active == true)]'):$"
[
{
"id": 1,
"active": true
},
{
"id": 4,
"active": true
}
]