What is JSONPath?
JSONPath is a query language for JSON, similar to XPath for XML. It allows you to select and extract specific data from a JSON structure using a standardized expression format. It is widely used in API testing, data scraping, and configuration management.
How to Use:
- Paste your JSON into the input editor below.
- Enter your JSONPath expression in the top input box (e.g.,
$.store.book[*].author). - Click Run or press
Ctrl+Enterto evaluate. - The matching results will appear in the Output panel.
JSONPath Syntax Reference
| Symbol | Description |
|---|---|
| $ | The root element to start the query. |
| . or [] | Child operator. |
| .. | Recursive descent. Deep scan. |
| * | Wildcard. All objects/elements regardless of their names. |
| [] | Subscript operator. XPath uses it to iterate over element collections and for predicates. |
| [,] | Union operator in XPath results in a combination of node sets. |
| [start:end:step] | Array slice operator borrowed from ES4. |
| ?() | Applies a filter (script) expression. |
| () | Script expression, using the underlying script engine. |
