loot.tools

JSONPath Evaluator

Paste a JSON document, type a JSONPath expression, and get every matching value along with the exact path to find it. It handles dot and bracket notation, wildcards, recursive descent with .., array slices, unions, and filter expressions like [?(@.price < 10)] that compare fields against literals or the document root. Great for pulling a field out of a big API response, testing the path you'll use in code, or checking which nodes a query actually returns. It all runs in your browser, so nothing you paste leaves your machine.

Query a JSON document with a JSONPath expression and see every matching value with its path. Supports dot and bracket notation, wildcards, recursive descent (..), array slices, and filters like [?(@.price < 10)]. Everything runs in your browser.

JSON
JSONPath expression

What JSONPath looks like

JSONPath is to JSON what XPath is to XML. A path starts at the root $ and walks down into the data: $.store.book[0].title reads the title of the first book. Use .key or ['key'] for a property, [0] for an array index (negatives count from the end), [0:2] for a slice, and * for a wildcard that grabs every child. Two dots, .., search recursively, so $..author finds every author no matter how deeply it's nested.

Filtering with conditions

Filters let you keep only the items you care about. [?(@.price < 10)] keeps array elements whose price is under 10, where @ refers to the current item. You can compare with == != < <= > >=, combine conditions with && and ||, negate with !, and check that a field simply exists by naming it: [?(@.isbn)]. A path that starts with $ inside a filter refers back to the whole document, so [?(@.price < $.expensive)] compares each item against a value elsewhere in the JSON.

When this helps

  • Pulling one field out of a large API response without scrolling through it
  • Testing the exact path you'll hand to a library before you write the code
  • Checking how many nodes a recursive query matches
  • Filtering a list down to the records that meet a condition
  • Grabbing every value of a key that appears at different depths