{ }jsonkitOpen
Querying and transformation

JSONPath

Also called RFC 9535

JSONPath is a query language that selects values from a JSON document with path expressions like $.store.book[0].title. A query starts at the root ($) and uses dot or bracket steps, wildcards, filters and recursive descent. Stefan Goessner proposed it in 2007, and RFC 9535 standardized it in 2024.

In more detail

JSONPath is a query language for selecting values from a JSON document. An expression starts at the root, $, and adds steps: .key or ['key'] for object members, [0] for array elements, [*] for every element and .. for every level below.

Filters keep only the elements that match a test. $.books[?(@.price < 10)] keeps books cheaper than 10, where @ is the element being tested. A query always returns a list of matches, which can be empty.

Stefan Goessner described JSONPath in 2007, and libraries implemented it slightly differently for years. RFC 9535, published in February 2024, standardized the syntax and results, including filter functions such as match() and search().

JSONPath only selects. To reshape, count or compute new JSON, use jq.

Example

Common JSONPath expressionstext
$.store.books[*].title              all book titles
$.store.books[-1]                   the last book
$..price                            every price at any depth
$.store.books[?(@.price < 10)]      books cheaper than 10

Try it

Learn more in the guide JSONPath cheat sheet: syntax, filters and examples.

← Back to JSONPath in the JSON glossaryUpdated 2026-10-01