Example JSON:
{
"user": {
"name": "Alice",
"age": 30,
"weird-key": "special"
},
"items": [
{"id": 423913, "title": "Good cat, bad cat"},
{"id": 500, "title": "Another story"}
],
"users": [
{"name": "Alice", "score": 95},
{"name": "Bob", "score": 87},
{"name": "Charlie", "score": 92}
]
}
Basics
Start every query with root. Navigate with dots and brackets.
Examples:
root.user.name chains properties with dots to access nested
values
→ Result: "Alice"
root.items accesses the entire array
→ Result:
[{"id": 423913, "title": "Good cat, bad cat"}, {"id": 500, "title": "Another story"}]
root.items[0] gets the first element using 0-based indexing
→ Result:
{"id": 423913, "title": "Good cat, bad cat"}
root["weird-key"] uses brackets for special characters or
spaces
→ Result: "special"
Find elements
Use .find(field=value) on arrays of objects to search for specific items
matching your criteria.
Examples:
root.items.find(id=423913) finds the first item where id equals
423913
→ Result:
{"id": 423913, "title": "Good cat, bad cat"}
root.items.find(title="Good cat, bad cat") searches for objects
with matching title (use quotes for text)
→ Result:
{"id": 423913, "title": "Good cat, bad cat"}
root.items.find(id=500).title chains properties after finding to access nested fields
→ Result: "Another story"
Working with Arrays
Arrays support multiple access patterns beyond simple indexing.
Examples:
root.users[0] accesses the first element with index 0
→ Result: {"name": "Alice", "score": 95}
root.users[-1] gets the last element using negative indexing
→ Result: {"name": "Charlie", "score": 92}
root.users[1].name accesses a specific property from the array element at index 1
→ Result: "Bob"
Autocomplete
As you type expressions, Json Mole suggests available paths based on your JSON structure. Use arrow keys to
navigate suggestions and press Tab or Enter to accept.
Example: When typing root.users[, you'll see suggestions like:
root.users[0]
root.users[1]
root.users.find(name="Alice")
See path and copy to clipboard
Mouse over a json object or field to see the path. Click the copy button that appears
to instantly copy the path to your clipboard.
Helpful errors
Json Mole provides intelligent error messages to help you debug your queries:
- Missing keys show all available keys at that level
- Invalid array indices display valid bounds (e.g., "Index 5 out of range, valid: 0-4")
.find() errors list all available fields and their sample values for that array
- Type mismatches explain what was expected vs. what was found
Privacy
Your JSON stays in your browser. We do not upload or store it anywhere. Everything
runs locally in your browser for maximum privacy and security.