Cheatsheet: JsonPath
Last updated 2026-09-20
Objects and root
Select the root JSON value.
Select an object property with dot notation.
Select nested object properties.
Use bracket notation for property names with punctuation or spaces.
Select multiple object properties at the same level.
Arrays and wildcards
Select an array element by zero-based index.
Select the last array element using a negative index where supported.
Select all elements of an array with a wildcard.
Select all property values of an object with a wildcard.
Select a property from every array element with a wildcard, e.g. every book's author.
Select a half-open array slice from index 1 up to but not including 4.
Select every second item from an array where slice steps are supported.
Reverse a fixed-length array by listing its indexes in reverse order (negative-step slicing like [::-1] is not supported by the site's JSONPath engine, jsonpath-plus, and returns an empty result).
Select multiple array indexes.
Recursive descent and filters
Find every price property anywhere in the document.
Find all author properties under any book objects.
Combine recursive descent with a wildcard to select every value in the document, at every depth.
Filter array items by a numeric comparison.
Filter items that have an isbn property.
Filter with a string equality comparison.
Filter with multiple conditions where supported by the implementation.
Filter with an OR condition and inequality/range comparisons.
Negate a filter condition.
Filter using a regular expression where supported.
Filter using recursive descent combined with a condition to search at any depth.
Functions and results
Get the length of a selected array where the implementation supports functions.
Return the minimum price where aggregate functions are supported.
Return the maximum price where aggregate functions are supported.
Return the average price where aggregate functions are supported.
Return matching nodes and remember that exact function support varies between JSONPath libraries.