Query JSON with dot and bracket paths

Extract a nested value from JSON with dot notation or bracket indexes.

freeworks offlinenothing uploaded
ToolJSON Path Query
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The query is tokenized into dot-separated names and numeric or quoted bracket segments, then each segment is followed through objects or arrays using own-property checks. The selected value is serialized as JSON and its type is reported.

  • The root marker $ selects the entire document.
  • Prototype names are blocked to prevent object-chain traversal.

Worked example

Nested Property
Extract a nested value using dot notation
Input
											{"user":{"name":"Alice","address":{"city":"Portland","zip":"97201"}}}
										
Output
												{
  "user": {
    "name": "Alice",
    "address": {
      "city": "Portland",
      "zip": "97201"
    }
  }
}
											

When to use this

API fixtures, package metadata, and webhook payloads use nested path extraction.

Edge cases

  • A missing property is reported as not found rather than returned as undefined.
  • A numeric bracket on an object is not converted into a string key.
  • __proto__, constructor, and prototype segments are blocked.