JSON Query

Extract exact values from JSON using JSONPath expressions, right in your browser. Filter arrays by condition, grab a specific key from deeply nested data, or pull multiple fields at once from a large API response without writing a parser.

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.

Grabbing the last item in an array

Use $.orders[-1:] to pull the most recent entry from a growing array of logs or orders without counting how many items are in it.

Extracting multiple specific fields at once

A union expression like $.user['name','email','id'] returns just those three fields from an object, skipping everything else in a large user record.

Checking the shape of an unfamiliar API payload

Not sure how deep a field is nested in a response you've never seen before? Start with $..fieldName to locate it anywhere, then narrow down to the exact path once you see where it lives.

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.

Is this JSONPath, JMESPath, or jq syntax?

JSONPath, evaluated with the jsonpath-plus library. It supports the standard $, ., [*], [n], and $..key syntax plus extensions like filter expressions ([?(@.price<10)]) and script expressions — but it is not compatible with jq or JMESPath query syntax, which use different operators.

Can I filter an array by more than one condition?

Yes — combine conditions with && or || inside a filter expression, for example $.products[?(@.price<100 && @.inStock==true)] to match items that are both cheap and in stock.

Does the path support negative array indexes or slices?

Yes. [-1] refers to the last element and slice syntax like [1:3] or [-2:] works the same way it does in Python, letting you grab a range of items without knowing the array's exact length.