JSONPath Tester
Run JSONPath expressions against your JSON and see each match with its path. Filters, wildcards, slices and recursive descent are supported.
How to test a JSONPath expression
Paste your JSON
A response from an API works well. Press Try an example to see the layout.
Write the path
Start with $ and use dots, brackets, wildcards, slices or filters, such as $.items[?(@.price < 10)].
Read the matches
Each match is listed with its location, so you can copy the exact path.
Recursive descent with .. finds a key at any depth.
Worked example
This is what JSONPath Tester gives for its own sample values. Open the tool above and change anything to try your own.
JSON
{
"store": {
"book": [
{ "title": "Sayings", "category": "reference", "price": 8.95 },
{ "title": "Sword", "category": "fiction", "price": 12.99 },
{ "title": "Moby Dick", "category": "fiction", "price": 8.99 }
],
"bicycle": { "color": "red", "price": 19.95 }
}
}- JSONPath
- $.store.book[?(@.price < 10)].title
Matched values
[ "Sayings", "Moby Dick" ]
Result
- $.store.book[0].title
- "Sayings"
- $.store.book[2].title
- "Moby Dick"
About JSONPath Tester
Try JSONPath expressions against your own data. Supported syntax includes $.a.b, ['key'], [0], [-1], [*], [0:3], [0,2], recursive descent with .., and filters such as [?(@.price < 10 && @.stock)].
FAQs
Which filters work?
Comparisons (==, !=, <, >, <=, >=), && and ||, !, regular expressions with =~ and plain existence checks on @.field.
Why no matches?
Check the spelling of keys, and remember that paths are case-sensitive.
Can I get a quick overview first?
Use JSON Statistics.