Test JSONPath expressions and jq-style filters against your own JSON. Type on the prompt line and the output shows only what matched. Select a result to see its path in the document.
The syntax
JSONPath works as you would expect: $.books[0].title, quoted keys like $["odd key"], negative indexes and slices like $.books[-1] and $.books[0:2], wildcards like $.books[*].author, recursive descent like $..id, and filters like $.books[?(@.price < 20 && @.in_stock)].
The jq style adds pipes and functions, as in .books | map(.title) | sort or [.books[] | select(.in_stock)] | length. Functions include length, keys, values, type, first, last, sort, sort_by, unique, reverse, flatten, add, min, max, to_entries, select, map, has, test, contains, startswith and endswith.
Working with results
While you type, a query that is not finished keeps the last good result on screen and says what is wrong, with the column. Results taken from the document keep their real paths. Copy, save and the converters apply to the result, so you can query an array and export it as CSV in one step.
Click any row in the tree and choose “query this” to start from its path.
Questions
Is this full jq?
No. It is a practical subset for reading data: paths, pipes, filters, comparisons and the functions listed above. Variables, reduce, string interpolation and arithmetic are not supported.
Can a query change my data?
No. Queries only read; your input is never modified by them.
Are long numbers compared correctly?
Yes. Integers beyond JavaScript's safe range are compared digit by digit.