Skip to content
rusthacks.dev
Web

JSONPath Tester

Run JSONPath queries against a JSON document: child and recursive descent, wildcards, indexes, slices and filters such as [?(@.price < 50)].

Free · No sign-up · Your inputs stay in your browser

Input

Test a JSONPath query

Output

Matches

2 matches

Follows RFC 9535 for the selectors listed. The same paths work in kubectl -o jsonpath and, without the leading $, close to what jq and MySQL's JSON_EXTRACT accept.

Runs in this browser. Nothing you paste is sent to a server.

A standard since 2024

JSONPath began as a 2007 blog post and spread through many slightly different implementations until the IETF published RFC 9535 in 2024. Filters in the RFC are written $[[email protected] < 50]; the older form with parentheses, [?(@.price < 50)], is accepted here too because most existing tools use it.

Where you meet it

kubectl get pods -o jsonpath='{.items[*].metadata.name}' uses a JSONPath dialect without the leading $. MySQL's JSON_EXTRACT(doc, '$.a.b') and PostgreSQL's jsonb_path_query() use path languages that start the same way and differ in details.

Share

Frequently asked questions

What does .. do in JSONPath?
It searches at any depth. $..price returns every price field anywhere in the document.
How do I filter an array by a field?
Use a filter: $.store.books[?(@.price < 50)] returns the books whose price is under 50. [?(@.isbn)] keeps only items that have an isbn.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Go deeper

Suggested reading

Editor's pick
Flat illustration for the post “An Axum Service You Can Run in Production From Zero”, composed around deploy.
WebGuide

An Axum Service You Can Run in Production From Zero

Build a small Axum 0.8 service from an empty crate to something you can deploy: a testable router, one error type, limits and timeouts, tracing, oneshot tests and graceful shutdown on SIGTERM.

17 min read
Flat illustration for the post “Request Limits and Slow Client Attacks in Rust Services”, composed around web.
Security

Request Limits and Slow Client Attacks in Rust Services

Slow clients and oversized requests exhaust connections and memory. Set header and body timeouts, body size limits, concurrency limits and keep-alive bounds at the proxy and in the Axum service with Tower layers.

5 min read

Keep planning

Similar tools