JSONPath query evaluates a JSONPath expression against a JSON document and returns matching values serialized as a JSON array string. The same jsonpath library powers both this page and the programmatic helper API for agents that need repeatable extraction logic.
How it works
The document is parsed once, then the expression is evaluated against the resulting tree. Matches are collected into an array—scalar hits appear as elements, multiple hits from filters or wildcards are all included. The result is re-serialized as JSON text so you can paste it into other tools or agent prompts without manual copying of individual fields.
When to use it
- Extract nested fields from large REST or GraphQL JSON blobs
- Filter arrays before LLM summarization to reduce token cost
- Prototype queries before embedding them in agent code or skill handlers
- Debug API fixtures by testing paths like
$.store.book[*].author
Example
On the sample donut JSON bundled with the tool, expression $.topping[*].type returns ["None","Glazed","Sugar",...] in the result field.
Limitations
Invalid JSON or malformed expressions show an error string instead of partial results. Very large documents are loaded fully in browser memory. JSONPath dialect details (filters, recursive descent) follow the bundled library—verify edge cases against your production runtime if they differ.