JSON path syntax: dot and bracket notation
How to write paths into JSON with dot and bracket notation, index arrays, quote awkward keys, and read the errors when a path misses.
Dot notation versus bracket notation
The simplest way to reach into JSON is dot notation, where $.store.name walks from the root object into store and then name. Brackets do the same job for cases dots cannot handle, so $.store["name"] is equivalent. This tool treats a leading $, $. or a plain leading dot as the root, which means $.a.b, a.b and .a.b all point at the same place. Mixing the two styles is fine, and the path list it generates chooses whichever style keeps each segment readable.
Indexing into arrays
Arrays are addressed by a numeric index inside brackets, counting from zero, so $.users[0] is the first user and $.users[1] is the second. Indices must be whole non-negative numbers, and asking for one past the end raises an out-of-range error rather than returning nothing. You can chain indices and keys freely, as in $.store.items[0].price, to descend through arrays of objects. Because the count starts at zero, the tenth element is [9], a classic off-by-one trap this tool helps you avoid by listing real paths.
Quoting keys with dots or spaces
When a key itself contains a dot, a space or a bracket, dot notation would misread it, so wrap the key in a quoted bracket. A field named in.stock is reached with ["in.stock"], for example $.items[0]["in.stock"], and single quotes such as ['in.stock'] work the same way. The quotes tell the parser to treat everything between them as one literal key name rather than a step separator. This is common with JSON that mirrors dotted config keys or namespaced fields.
Reading the error messages
Every failure names where it happened. A missing field reports Key "color" not found at $.store, an over-long index reports Index [5] out of range at $.users, and reaching into a value that is not the expected type reports Expected an object or Expected an array at that spot. These messages trace the path you typed up to the point it broke, so you can fix the exact segment. Pairing them with the clickable path list turns trial and error into a quick, guided lookup.