JSONPath Tester
Try a JSONPath expression on your JSON and see the results and the path of each match right away. Supports filters, array slices, and deep search (..).
Examples
0 characters0 bytes
How to Use It
- Paste the JSON.
- Type the query, or choose one of the examples.
- Copy the values or the paths of the matches.
Questions and Answers
How do I write a filter?
Use ?, and @ for the current node: $.items[?@.price < 10 && @.stock > 0]. Parentheses around the filter are optional.
What form do the paths have?
They are RFC 9535 normalized paths, such as $['store']['book'][0], which have one form for each node.
Good to Know
The RFC 9535 syntax works. Older forms such as JavaScript in filters (?(@.a.length)) do not. match() and search() use the regular expressions of the browser. One query returns up to 10,000 nodes.
Related Tools
- JSON Formatter and ValidatorPretty-print or minify JSON, or find its errors with the line and column.
- JSON DiffCompare two JSON documents by structure, whatever the key order and spacing, and see each difference with its path.
- Regex TesterTest a JavaScript regex on your text, see the matches and groups, and read a plain explanation of each part. Works with Persian text and \p{…}.
Source code of this tool (opens in a new tab)Report a problem on GitHub (opens in a new tab)