JSON Toolkit

JSONPath Query

Extract JSON nodes with an expression and copy a single or all matched results

Waiting for a querySupports expressions such as $.store.book[*].author and $..price
Expression
Line 1, column 1: 缺少值
Matches0 matches
Enter JSON and an expression, then click Query

JSONPath query explained

JSONPath locates nodes with a path-like expression, for example walking object fields by level, iterating arrays with a wildcard, or filtering elements by a condition. This page parses JSON locally, runs the expression and lists every match together with its path.

An invalid expression reports an error without breaking the rest of the page. You can copy a single matched value or serialize all matches into an array text for scripts and test cases.

The default sample extracts fields from a book array. Replace it with your own data and expression; changing either input clears the previous result, so run the query again.

Frequently asked questions

Are filter expressions supported?
Common filter forms are supported, such as selecting array elements by numeric or string conditions. Exact syntax depends on the JSONPath implementation, so validate complex expressions on sample data first.
Why is the result an empty array?
An empty result usually means the path matched no node. Check key spelling, array indexes and the number of levels.
Can all matches be copied at once?
Yes. Copying all results puts the matched values into the clipboard as a JSON array text, and nothing is produced when there is no match.