Skip to main content

JSONPath Evaluator

Query JSON the way you would in code.

Write a JSONPath expression, run it, and see every match with its resolved path and value. Click a node in the tree to have its path written for you, then generalise it into a query.

Valid JSONCalculating statistics…

Input JSON

Size: 472 BLines: 27
0 matches

No values matched $.projects[*].name.

What is JSONPath?

JSONPath is a query language for JSON, in the spirit of XPath for XML. An expression describes a route through the document, and evaluating it returns every value that route reaches. It is widely used in API testing tools, log pipelines, Kubernetes tooling and configuration systems.

JSONPath syntax

  • $ — the root of the document.
  • .property or ["property"] — a child property.
  • [0], [-1:] — array index and slice.
  • [*] — every element of an array or every property of an object.
  • .. — recursive descent; $..id finds every id at any depth.
  • [?(@.status=="active")] — a filter expression over each item.

Building an expression from the tree

The fastest way to write a correct query is to stop guessing at key names. Expand the tree, click the node you want, and copy its path — you will get something like $.data[3].preferences.theme. Replace the concrete index with [*] and you have a query that returns that field for every record.

Security note

Jsonviewpro evaluates expressions in a restricted, safe mode. Filter expressions work normally, but they are handled by a limited expression evaluator rather than the JavaScript engine: assignments, constructor calls and access to globals all fail. A query is data, never code.

Frequently asked questions

Which JSONPath dialect is used?
JSONPath-Plus, the most widely used JavaScript implementation, running in its safe evaluation mode so a query cannot execute arbitrary JavaScript.
How do I get every value of one field?
Use a wildcard — $.users[*].email — or recursive descent — $..email — when the field is nested at varying depths.
Can I filter by a value?
Yes: $.projects[?(@.status=="active")] returns every project whose status is active.
Are queries run on a server?
No. Both the document and the query stay in your browser.