← All JSON guides

JSON guide · 8 min read

JSONPath Examples: Query Nested JSON Step by Step

Learn JSONPath syntax for properties, arrays, wildcards, recursive descent and filters with practical examples.

Published 2026-08-05Reviewed 2026-08-05

Start at the root

The dollar sign represents the root value. Dot notation selects object properties and bracket notation is useful for indexes or property names containing special characters.

$.store.books[0].title

Select every array item

Use a wildcard to select the same property from all elements in an array.

$.store.books[*].title

Recursive descent and filters

Recursive descent searches below the current node, while filters select array elements matching a condition. Exact syntax and supported operators can differ between implementations.

$..price
$.store.books[?(@.price < 15)]

Test against representative data

A path that works for one sample may fail when a property is absent or changes type. Test optional fields, empty arrays and mixed records before relying on a query in production.

Common questions

Frequently asked questions

Is JSONPath a single formal standard?

Implementations historically differed. Always confirm the syntax and behavior supported by the library or tool you use.

What does $ mean in JSONPath?

It identifies the root of the JSON document.