List Every Path in a JSON Document
List every leaf path in a JSON document, such as $.user.roles[0], with its type and value. Runs in your browser.
What listing JSON paths does
The document is walked once and every leaf is printed as one line: the path from the root, the JSON type in parentheses, and the value when it is short enough to read. Array elements are addressed with square brackets, objects with a dot. Empty objects and empty arrays are reported as leaves, because a branch that exists but holds nothing is a fact worth seeing when you are writing a selector.
How to use it
List Every Path in a JSON Document: paste the JSON into the box above, and press Run to get the paths below.
Worked example
Input:
{
"id": 42,
"displayName": "Ada Lovelace",
"active": true,
"score": 9.5,
"tags": [
"math",
"engine"
],
"address": {
"city": "London",
"country": "GB"
},
"projects": [
{
"name": "Analytical Engine",
"year": 1843
},
{
"name": "Note G",
"year": 1843,
"notes": "first published algorithm"
}
],
"nickname": null
}
Output:
$.id (number) = 42
$.displayName (string) = "Ada Lovelace"
$.active (boolean) = true
$.score (number) = 9.5
$.tags[0] (string) = "math"
$.tags[1] (string) = "engine"
$.address.city (string) = "London"
$.address.country (string) = "GB"
$.projects[0].name (string) = "Analytical Engine"
$.projects[0].year (number) = 1843
$.projects[1].name (string) = "Note G"
$.projects[1].year (number) = 1843
$.projects[1].notes (string) = "first published algorithm"
$.nickname (null)
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON and returns paths; reloading the page discards both.
The document is walked once and every leaf is printed as one line: the path from the root, the JSON type in parentheses, and the value when it is short enough to read. Array elements are addressed with square brackets, objects with a dot. Empty objects and empty arrays are reported as leaves, because a branch that exists but holds nothing is a fact worth seeing when you are writing a selector.
List every leaf path in a JSON document, such as $.user.roles[0], with its type and value. Runs in your browser.
How to use it
List Every Path in a JSON Document: paste the JSON into the box above, and press Run to get the paths below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON and returns paths; reloading the page discards both.
What to Expect
Best for
- Converting JSON to paths when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
{ "id": 42, "displayName": "Ada Lovelace", "active": true, "score": 9.5, "tags": [ "math", "engine" ], "address": { "city": "London", "country": "GB" }, "projects": [ { "name": "Analytical Engine", "year": 1843 }, { "name": "Note G", "year": 1843, "notes": "first published algorithm" } ], "nickname": null }
Sample output
$.id (number) = 42 $.displayName (string) = "Ada Lovelace" $.active (boolean) = true $.score (number) = 9.5 $.tags[0] (string) = "math" $.tags[1] (string) = "engine" $.address.city (string) = "London" $.address.country (string) = "GB" $.projects[0].name (string) = "Analytical Engine" $.projects[0].year (number) = 1843 $.projects[1].name (string) = "Note G" $.projects[1].year (number) = 1843 $.projects[1].notes (string) = "first published algorithm" $.nickname (null)
Frequently asked questions
How do I use the list every path in a json document?
List Every Path in a JSON Document: paste the JSON into the box above, and press Run to get the paths below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.