JSON Guide

JSONPath query guide

Learn the essential expressions for selecting values from nested JSON.

Paths begin at the root

The dollar sign represents the complete document. Dot notation selects an object property, so $.user.name selects name inside user.

Bracket notation selects indexes and handles unusual property names. $.items[0] selects the first item, while $['display name'] selects a key containing a space.

Select multiple values

The wildcard expression * selects all children at one level. $.items[*].id returns each id found in the items array.

Filters and recursive descent are powerful, but broad queries can be expensive on very large payloads. Prefer the narrowest path that expresses your intent.

Continue learning