Cheatsheet: JsonPath
Last updated 2026-06-21
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 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.
Select multiple array indexes.
Recursive descent and filters
Find every price property anywhere in the document.
Find all author properties under any book objects.
Filter array items by a numeric comparison.
Filter items that have an isbn property.
Filter with multiple conditions where supported by the implementation.
Filter using a regular expression where supported.
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.
See also: