JSON

How to Use JSONPath

Pull values out of nested API JSON with JSONPath expressions. FreeToolMate runs the query in your browser so sample payloads stay private.

Steps

  1. Open the JSONPath Tester.
  2. Paste JSON (or format it first with JSON Beautify).
  3. Enter an expression such as $.items[*].id or $..error.
  4. Run the query and copy matching values.
  5. Refine the path until only the fields you need remain.

Starter expressions

  • $.user.name — one field
  • $.items[*].price — every item price
  • $..id — every id anywhere in the tree
  • $.items[?(@.active==true)] — filter objects

Related reading

All articles · JSON Tools hub