Developer Tools
JSON Path Tester - Test JSONPath Expressions Online
Test JSONPath expressions against any JSON document in real time. Supports dot notation, wildcards, recursive descent, array slices, and filter expressions.
3 matches
$.store.book[0].title"Atlas"
$.store.book[1].title"Moby Dick"
$.store.book[2].title"Sword"
What is JSONPath?
JSONPath is a query language for JSON, analogous to XPath for XML. It lets you extract specific values from a JSON document using a concise path expression. Defined by Stefan Goessner in 2007 and widely used in tools like Kubernetes, AWS Step Functions, and Gatling.
Supported syntax
| Expression | Meaning |
|---|---|
$ | Root element |
.key | Child key |
['key'] | Bracket child (useful for keys with dots) |
[n] | Array index (negative counts from end) |
[*] | All children (wildcard) |
[0:2] | Array slice |
..key | Recursive descent: find key anywhere |
[?(@.price > 10)] | Filter expression |
Filter operators
Filter expressions use @ to refer to the current element. Supported operators: ==, !=, >,
<, >=, <=.
JSONPath vs. JMESPath
| Feature | JSONPath | JMESPath |
|---|---|---|
| Origin | Stefan Goessner, 2007 | Amazon Web Services, 2013 |
| Standardization | RFC 9535 (2024) | RFC 9901 (draft) |
| Recursive descent | ..key | Not supported |
| Filter syntax | [?(@.age > 18)] | [?age > \`18\`] |
| Used in | Kubernetes, Gatling, Newtonsoft.Json | AWS CLI, Terraform, Ansible |
Real API examples
Typical JSONPath queries against a REST API response:
$.data[*].id- extract all IDs from a paginated list$.items[?(@.status == "active")].name- filter active items by name-
$..href- recursively find allhrefvalues in a HAL response $.meta.pagination.total- drill into nested metadata