What is JSONPath?
JSONPath is a query language for selecting values inside a JSON document, similar to how XPath works for XML. An expression starts at the root, written as $, and walks down through keys and array indexes. This tester runs your expression against the JSON on the left and shows the matching values on the right as you type, along with the number of results.
How do you write a JSONPath expression?
Use a dot for child keys and square brackets for array indexes. These patterns cover most queries:
- $.store.name selects the name key inside store.
- $.items[0] selects the first item of an array.
- $.items[*] selects every item of an array.
- $..price finds every price key at any depth.
- $.items[?(@.price < 10)] keeps only the items that match a condition.
The example buttons above the editor fill in common expressions that you can adapt to your own data.
Frequently asked questions
What does $ mean in JSONPath?
$ is the root of the document. Every expression starts from it, so $ on its own returns the whole JSON.
What is the difference between . and .. in JSONPath?
A single dot selects a direct child. A double dot searches recursively, so $..id returns every id key at any level of nesting.
Why does my expression return no results?
Check that key names match exactly, including upper and lower case, and that array indexes start at 0. The input must also be valid JSON; if it is not, the parser error is shown instead of results.
Is my data sent anywhere?
No. Queries run in your browser and your JSON never leaves your device.