BOXUNBAOTools
Simplify everyday tasks.Back to website
ToolboxJSONPath Query

JSONPath Query

Runs in your browser

Filter JSON, inspect matched paths and values, and copy matches as a JSON array.

How to use

Steps

  1. Paste an API response or other JSON data into JSON input. The root can be an object, array, or scalar.
  2. Enter a query beginning with $ in JSONPath expression. Use dots for fields and square brackets for indexes or keys with spaces. Use * to match all children.
  3. Select Run query. Inspect each value's location under Matched paths. Copy result copies the full JSON array.

Example

Paste the sample JSON and run $.data.items[*].id. The result is ["0012", 9007199254740993123].

{"data":{"items":[{"id":"0012"},{"id":9007199254740993123}]}}

Tips

  • $..id finds matching keys recursively,$.items[-1] selects the final item, and$["first name","id"] selects two keys at once.
  • Queries return up to 2,000 items. The table previews the first 50 matches. Copy includes all matches and preserves large integers.