JSON Path Usage Guide
Expression Descriptionβ
Currently, JSONPath only supports chained calls
$represents the root element of the document.nodeNameor[nodeName]represents matching child nodes
Examplesβ
{
"firstName": "John",
"lastName" : "doe",
"age" : 26,
"address" : {
"streetAddress": "naist street",
"city" : "Nara",
"postalCode" : "630-0192"
},
"phoneNumbers": [
{
"type" : "iPhone",
"number": "0123-4567-8888"
},
{
"type" : "home",
"number": "0123-4567-8910"
}
]
}
Expression: $.firstName Value: "John"
Expression: $.age Value: 26
Expression: $.phoneNumbers[:1].type Value: "iPhone"