JSON Path Challenge
Navigate nested documents, extract targeted attributes, filter array elements, and master JSONPath expressions across 10 progressive puzzle tiers.
Level 1: Object Property Navigation
Extract the name of the user from the JSON object.
$.user.name, user.name, & [?] filters{
"user": {
"id": "usr_4821",
"name": "Alex Rivera",
"role": "Lead Platform Engineer",
"verified": true
},
"settings": {
"theme": "dark",
"notifications": true
}
}"Alex Rivera"Understanding JSONPath & Object Traversal
JSONPath is a standardized query syntax for JSON documents, serving an analogous role to XPath in XML. It allows developers to selectively navigate through arbitrary object hierarchies, extract specific array subsets, and evaluate boolean filter predicates without writing imperative loops.
JSONPath queries always start with the root identifier $, followed by property selectors, array brackets, wildcards, and filter expressions.
Root ($): Refers to the root object or array.
Dot Child (.property): Direct key accessor (e.g. $.user.name).
Array Index ([n]): 0-indexed element selector (e.g. $.servers[0]).
Wildcard ([*]): Selects all elements in an array or all keys in an object.
Recursive Descent ($..key): Searches recursively through all nested levels for matching keys.
Filter Predicate ([?(@.expr)]): Evaluates boolean condition against each item.
Array Slices ([-2:]): Extracts slices from start or end indices.
Frequently Asked Questions
Can I write standard JavaScript dot-notation?
Yes! Dev Arcade JSON Path evaluator accepts both canonical JSONPath expressions (e.g., $.user.name) and standard JavaScript property chains (e.g., user.name or data.user.name).
How is match correctness validated?
The extracted value is verified against the challenge target using strict JSON deep equality. Primitives, arrays, and nested sub-objects must all match their target values in shape and content.