JSONPath Tester
Test a JSONPath query against JSON you paste. Match nodes locally in the browser; nothing leaves your device.
- What it does
- Runs a JSONPath query against JSON you paste.
- When to use it
- You are checking that a query selects the nodes you expect.
- Example
- A query looks like $.items[0].name. Matches are shown from your document.
Test and validate JSONPath expressions against your JSON data.
JSONPath Expression
Result
JSONPath Reference
Basic Syntax
| Symbol | Description |
|---|---|
| $ | Root object |
| @ | Current object |
| . | Child operator |
| .. | Recursive descent |
| * | Wildcard. All objects/elements |
| [] | Subscript operator |
| [,] | Union operator |
Examples
| JSONPath | Description |
|---|---|
| $.store.book[0] | First book |
| $.store.book[-1] | Last book |
| $.store.book[0,1] | First two books |
| $.store.book[*] | All books |
| $.store.book[*].author | All authors |
| $.store.book[?(@.price < 10)] | Books less than 10 dollars |
| $..book[?(@.isbn)] | All books with ISBN |