$$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​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | object | Yes | Object to query | |
path | string | Yes | JSONPath expression | |
options | string[] | ["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
}
]