Skip to main content

JSON Path Usage Guide

Expression Description​

Currently, JSONPath only supports chained calls

  • $ represents the root element of the document
  • .nodeName or [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"