How to use this tool
- Enter json document, json pointer — or (root).
- Select Update result to view the result.
- Check the method and assumptions below before using the result.
Input reference and sample values
Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.
| Input | Format and units | Sample |
|---|---|---|
| JSON document | Keep the structure and separators shown in the sample. Line breaks are retained in this input. | {"users":[{"name":"Sam","active":true}]} |
| JSON Pointer — or (root) | Keep the structure and separators shown in the sample. Line breaks are retained in this input. | /users/0/name |
Result for these sample inputs
"Sam"
Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.
The method, explained
Split the pointer on /, decode ~1 as / and ~0 as ~, then traverse only existing own properties. Array indices start at zero. This is JSON Pointer, not JSONPath.
Using json document = {"users":[{"name":"Sam","active":true}]}, json pointer — or (root) = /users/0/name, the result is "Sam". Change these example inputs to match your task; use the method above to check each step.
What to keep in mind
Maximum input length is 20,000 characters. Wildcards, filters and recursive descent are not part of JSON Pointer.
Common questions
How do I select a property containing a slash?
Escape a slash as ~1 and a tilde as ~0. The property a/b is selected by /a~1b. Use (root) in this interface for the whole document.
Can I use $.users[*]?
No. That is JSONPath syntax. Use /users/0 for the first item or /users for the complete array.
Methodology maintained by ClarityKit. How these tools are built and checked.