JSONPath expressions describe which values to select from a JSON document. They are useful when an API response is nested several levels deep or when you need only some array entries. Try the examples in the MyJSONPal JSONPath evaluator; it evaluates queries in your browser and shows each matching value with its normalized path.
Start with a small document
{
"team": "Platform",
"users": [
{ "name": "Ari", "active": true, "level": 4 },
{ "name": "Bea", "active": false, "level": 2 },
{ "name": "Chen", "active": true, "level": 5 }
],
"service": { "name": "catalog", "region": "eu-west" }
}A JSONPath query begins at the root, written $. Each selector navigates to a child, array item, or set of matching descendants.
Select properties, indexes, and groups
$.teamselects the root object'steamproperty.$.service.nameselects a nested property.$.users[0].nameselects the first array item's name; indexes start at zero.$.users[*].nameselects the name from every user.$['service']['region']uses bracket notation; use it when property names contain spaces or punctuation.
The wildcard * selects children at that level. Recursive descent, written.., searches below the current node—for example, $..name can find matching name properties at multiple depths. Broad recursive queries can return more values than expected, so check the result paths.
Filter array items by a property
A filter selector tests each array item. This expression returns names whose user object has a level above 3:
$.users[?(@.level > 3)].nameThe filter's @ refers to the item currently being checked. In the example,@.level reads that item's level, and .name selects the name from each item that matches. The evaluator supports RFC 9535 JSONPath syntax, including selectors, wildcards, recursive descent, array indexes, slices, and filters.
Read the returned paths
A query selects values; it does not rewrite the source JSON. MyJSONPal displays matches with normalized paths such as $["users"][2]["name"], and lets you copy or download the result as JSON. Use the paths to locate each value in the original data or to explain which records matched a filter.
If the expression is invalid, check the brackets, quotes around unusual property names, and selector placement. The input itself must also be valid JSON; fix syntax errors with theFix JSON tool before running a query.
When JSONPath is the right tool
Use JSONPath to retrieve matching values without changing the document. To turn nested keys into path-value pairs, use Flatten JSON. To compare two versions of a document, use JSON Diff. Each has a different output: matches, flattened data, or structural changes.
Open the JSONPath evaluator, paste your JSON, enter an expression, and run the query.