JSONPath expressions always refer to a JSON structure in the same way as XPath expression are used in combination
with an XML document. The "root member object" in JSONPath is always referred to as `$` regardless if it is an
Jayway JsonPath is a Java port of [Stefan Goessner implementation](http://goessner.net/articles/JsonPath/). JsonPath expressions always refer to a JSON structure in the same way as XPath expression are used in combination
with an XML document. The "root member object" in JsonPath is always referred to as `$` regardless if it is an
object or array.
JSONPath expressions can use the dot–notation
JsonPath expressions can use the dot–notation
`$.store.book[0].title`
@ -35,7 +35,7 @@ Operators
Path Examples
-------------
Given the
Given the json
```javascript
{
@ -79,21 +79,21 @@ Given the
| JSONPath | Result |
| :------- | :----- |
| `$.store.book[*].author` | The authors of all books |
| `$..author` | All authors |
| `$.store.*` | All things, both books and bicycles |
| `$.store..price` | The price of everything |
| `$..book[2]` | The third book |
| `$..book[(@.length-1)]` | The last book |
| `$..book[0,1]` | The first two books |
| `$.store.book[*].author` | The authors of all books |
| `$..author` | All authors |
| `$.store.*` | All things, both books and bicycles |
| `$.store..price` | The price of everything |
| `$..book[2]` | The third book |
| `$..book[(@.length-1)]` | The last book |
| `$..book[0,1]` | The first two books |
| `$..book[:2]` | All books from index 0 (inclusive) until index 2 (exclusive) |
| `$..book[1:2]` | All books from index 1 (inclusive) until index 2 (exclusive) |
| `$..book[-2:]` | Last two books |
| `$..book[2:]` | Book number two from tail |
| `$..book[?(@.isbn)]` | All books with an ISBN number |
| `$..book[-2:]` | Last two books |
| `$..book[2:]` | Book number two from tail |
| `$..book[?(@.isbn)]` | All books with an ISBN number |
| `$.store.book[?(@.price < 10)]` | All books in store cheaper than 10 |
| `$..book[?(@.price <= $['expensive'])]` | All books in store that are not "expensive" |