JSONPath Cheatsheet — Common Patterns and Examples

Use these examples in the JSONPath Evaluator.

Selecting

$.store.book[0].title  // first title
$..price                  // all prices
$.store.book[*].author    // all authors

Filtering

$.books[?(@.price < 10)].title
$.items[?(@.tags && @.tags.indexOf('hot')>-1)]

Slicing

$.books[:3]      // first three
$.books[-1:]      // last one

See also: How to Use JSONPath Evaluator