Skip to main content

$$jsonpath

Query a JSON document using JSONPath

Usage​

"$$jsonpath(<path>,[options]):{input}"
{
"$$jsonpath": /* value */,
"path": /* jsonpath string */,
"options": [/* configurations string */]
}

Returns​

Depends on the expression

Arguments​

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

Examples​

Input

Definition

Output

{
"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 }
]
{
"path": "$.path"
}
"$$jsonpath($.path):$"
"$.path"