JSON Path Tester

Test JSONPath expressions against your JSON data. Extract specific values and navigate complex JSON structures easily.

JSON Data

JSONPath Expression

Result:

Enter a JSONPath expression and click "Test Path"

What is JSONPath?

JSONPath is a query language for JSON, similar to XPath for XML. It allows you to extract specific data from JSON documents using path expressions.

JSONPath Syntax

Expression Description Example
$ Root object $ - entire document
@ Current object @.price - current price
. or [] Child operator $.store.book or $['store']['book']
.. Recursive descent $..author - all authors
* Wildcard $.store.* - all children
[] Array subscript $.store.book[0] - first book
[,] Union operator $.store.book[0,1] - first two books
[start:end] Array slice $.store.book[0:2] - first two books
[?()] Filter expression $.store.book[?(@.price < 10)]

Common Examples

  • $.store.book[*].author - Get all book authors
  • $..author - Get all authors (recursive)
  • $.store.* - Get all items in store
  • $.store..price - Get all prices
  • $..book[0] - Get first book
  • $..book[-1] - Get last book
  • $..book[0,1] - Get first two books
  • $..book[:2] - Get first two books (slice)