JSONPath Guide

JSONPath is a query language for selecting values from JSON documents.

Basic selectors

$ is the root. .key selects a child. [*] selects all array items.

$.store.book[*].title

Recursive descent

.. searches anywhere below the current node.

$..price

Array indexing

Use [0], [0,1] or [0:2] to select positions and slices.

$.store.book[0:2]

Filters

Filters use [?(@.key operator value)] to select matching nodes.

$.store.book[?(@.price < 10)]

Common operators: ==, !=, <, >, <=, >=.