JSON Query

Pull out exactly the values you need from JSON using JSONPath.

Result

Usage examples

Pulling just the fields you need out of a large API response

Instead of scanning through the entire response JSON, grab exactly what you need at once with a path like $.data.items[*].id.

Filtering down to items matching a condition

Use a filter expression like $.products[?(@.price<10000)] to narrow down to items matching a condition on price, stock, or anything else.

Finding a specific key everywhere in a nested structure

The recursive descent syntax, $..price, finds every key with that name anywhere in the document, regardless of depth or position.

Frequently asked questions

Are the JSON and expression I enter sent to a server?

No. The query runs entirely in your browser, and what you enter is never sent to a server.

I don't remember JSONPath syntax.

Common patterns: $ means the whole document, .key a specific key, [*] every item in an array, [0] the first item, [?(@.price<10)] filters to items matching a condition, and $..key finds every key with that name at any depth.

My result is empty — why?

That can mean either the path doesn't point to any real data, or the expression has a syntax error — both show up as an empty result. Try shortening the path one step at a time to see where it stops matching.

Is the query result always an array?

Yes. JSONPath collects every matching value into an array, even when exactly one value matches — you'll get an array of length one.