JSON Path Tester Online
Run a JSONPath expression against your own document and see the matches highlighted, so you can get the selector right before it goes into code.
How to use
- Paste your JSON document.
- Type a JSONPath expression.
- See the matching values highlighted.
Frequently asked questions
What does $ mean in a JSONPath?
The root of the document. Every expression starts there, so $.users[0].name reads as the name of the first user.
How do I match every item in an array?
Use the wildcard: $.users[*].email returns the email of every user rather than one at a position.
What is the .. operator for?
Recursive descent. $..id finds every id at any depth, which is the quickest way to pull one field out of a deeply nested response.
Do all JSONPath implementations agree?
Not entirely. Filter expressions and some edge cases differ between libraries, so verify an expression against the library your code actually uses.
Last updated
Powered by maratool