How to filter a non-array in JsonPath
问题 Using the following JSON (from http://jsonpath.com): { "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" } ] } I would like to get the root object only if firstName is John. I have tried these inputs and many other similar ones: $.[?($.firstName == 'John')] $.[?($.'firstName' == 'John'