DevBolt

JSONPath Syntax Reference

Learn every JSONPath operator and expression type with clear explanations. Test your expressions instantly in the browser — no server requests, no data leaves your machine.

← Back to tools

JSON Path Tester

Test JSONPath expressions against your JSON data with real-time evaluation. Perfect for building API queries, data extraction, and debugging JSON structures.

About JSONPath

JSONPath is a query language for JSON, similar to XPath for XML. It lets you extract specific values from complex JSON structures using path expressions.

Common syntax:
  • $ — root object
  • .key — child property
  • [*] — all array elements
  • [0], [0:3] — array index / slice
  • .. — recursive descent (search all levels)
  • [?(@.price < 50)] — filter expression

JSONPath is commonly used in REST API testing, data pipelines, and configuration management to extract or validate specific fields from JSON payloads.

Everything runs in your browser — no data is sent over the network.

What is JSONPath?

JSONPath is a query language for JSON, analogous to XPath for XML. It lets you extract specific values from deeply nested JSON structures using concise dot-notation or bracket-notation expressions. JSONPath was originally proposed by Stefan Goessner in 2007 and is now formalized in RFC 9535.

Core operators

The root operator ($) refers to the top-level object. The dot operator (.) accesses child properties, while bracket notation (['key']) handles special characters in keys. The wildcard (*) matches all elements at a level, recursive descent (..) searches all descendants, and array slices ([start:end:step]) select ranges of array elements. Filter expressions ([?(@.price < 10)]) let you query arrays conditionally.

Frequently Asked Questions

What is the difference between dot notation and bracket notation in JSONPath?

Dot notation ($.store.book) is shorter and cleaner for simple property names. Bracket notation ($['store']['book']) is required when property names contain spaces, dots, or other special characters.

Does JSONPath support filtering arrays?

Yes. Filter expressions like $..book[?(@.price < 10)] select array elements that match a condition. You can use comparison operators, logical AND/OR, and regular expressions in filters.