@ -11,6 +11,8 @@ Jayway JsonPath is a Java port of [Stefan Goessner JsonPath implementation](http
News
----
22 Mar 2023 - Released JsonPath 2.8.0
30 Jan 2022 - Released JsonPath 2.7.0
02 Jun 2021 - Released JsonPath 2.6.0
@ -43,7 +45,7 @@ JsonPath is available at the Central Maven Repository. Maven users add this to y
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.7.0</version>
<version>2.8.0</version>
</dependency>
```
@ -165,25 +167,25 @@ Given the json
}
```
| JsonPath (click link to try)| Result |
| :------- | :----- |
| <ahref="http://jsonpath.herokuapp.com/?path=$.store.book[*].author"target="_blank">$.store.book[*].author</a>| The authors of all books |
| <ahref="http://jsonpath.herokuapp.com/?path=$..author"target="_blank">$..author</a> | All authors |
| <ahref="http://jsonpath.herokuapp.com/?path=$.store.*"target="_blank">$.store.*</a> | All things, both books and bicycles |
| <ahref="http://jsonpath.herokuapp.com/?path=$.store..price"target="_blank">$.store..price</a> | The price of everything |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[2]"target="_blank">$..book[2]</a> | The third book |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[-2]"target="_blank">$..book[-2]</a> | The second to last book |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[0,1]"target="_blank">$..book[0,1]</a> | The first two books |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[:2]"target="_blank">$..book[:2]</a> | All books from index 0 (inclusive) until index 2 (exclusive) |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[1:2]"target="_blank">$..book[1:2]</a> | All books from index 1 (inclusive) until index 2 (exclusive) |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[-2:]"target="_blank">$..book[-2:]</a> | Last two books |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[2:]"target="_blank">$..book[2:]</a> | All books from index 2 (inclusive) to last |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[?(@.isbn)]"target="_blank">$..book[?(@.isbn)]</a> | All books with an ISBN number |
| <ahref="http://jsonpath.herokuapp.com/?path=$.store.book[?(@.price < 10)]"target="_blank">$.store.book[?(@.price <10)]</a> | All books in store cheaper than 10 |
| <ahref="http://jsonpath.herokuapp.com/?path=$..book[?(@.price <= $['expensive'])]"target="_blank">$..book[?(@.price <= $['expensive'])]</a> | All books in store that are not "expensive" |