Skip to content

JSON

JSONPath tester

Query JSON with $.store.book[?(@.price < 10)] style expressions, without eval.

Private Everything on these pages runs in your browser. What you type is never sent to a server and nothing is stored.

Supported: $ .key ['key'] [0] [-1] [*] ..key [0:2] [?(@.price < 10)] [?(@.isbn)]

How to use it

  1. Paste JSON into the document box.
  2. Type a JSONPath expression, for example $.store.book[*].title.
  3. Read the matches; change the expression to refine them.

Example

Input

$.items[*].name   on   {"items":[{"name":"a"},{"name":"b"}]}

Result

["a", "b"]

Frequently asked questions

Which JSONPath syntax is supported?

The common subset: the root $, child names, [n] indexes, [*] wildcards, .. recursive descent, [start:end] slices and simple filters. It is a practical subset, not every dialect.

Why does it not use eval?

Filter expressions are parsed by a small interpreter instead of running your text as code, so a pasted expression cannot execute anything.

Related articles