Enterprise JSON documents often span thousands of lines with deep nesting. Extracting specific arrays, filtering objects by conditional predicates, or selecting specific IDs with manual scripting is slow.
JSONPath functions as XPath for JSON data, allowing you to extract exact values using expressive declarative selectors.
1. JSONPath Quick Syntax Reference
| Selector | Meaning | Example |
|---|---|---|
$ | Root object / array | $ |
. or [] | Child operator | $.store.book or $['store']['book'] |
.. | Recursive descent (deep search) | $..author (finds all authors everywhere) |
* | Wildcard matches all elements | $.store.book[*] |
[?(@.price < 10)] | Filter expression | $..book[?(@.price < 10)] |
[:2] | Array slice | $.items[0:5] |
2. Step-by-Step Query Execution
Step 1: Load Payload
Paste your large JSON document into the query workspace.
Step 2: Write JSONPath Query
Enter your selector expression into the query bar (e.g., $.users[?(@.role == 'admin')].email).
Step 3: Inspect Real-Time Matches
Matching nodes are highlighted in real time and extracted into a clean results pane with match count statistics.
The query engine analyzes the active document schema to provide intelligent autocomplete suggestions as you type property paths.