JSON Path
Free JSON Path calculator with clear step-by-step results.
About JSON Path
Normalises a JSONPath expression into unambiguous bracket notation, counts its depth and wildcards, and checks any numeric indices against an array size you supply. Bracket notation matters because dot notation cannot express keys containing dots, spaces or reserved characters.
Formulas
Depth
Depth = number of path segments after the root $
Bracket form
Each named segment becomes ['name']; each index stays [n]
Worked example
With the default values below, JSON Path returns Bracket notation equivalent of $['store']['book'][2]['author']. Change any input above and every figure here is recalculated in your browser.
Inputs used
- JSONPath expression
- $.store.book[2].author
- Array size at the indexed levelminimum 0
- 12
Results
- Bracket notation equivalent
- $['store']['book'][2]['author']
- Path depth
- 4 segments
- Wildcard segments
- 0
- Index bounds check
- All indices are within bounds
Step by step
- 1Values used
- 2Depth
- 3Bracket form
- 4Bracket notation equivalent= $['store']['book'][2]['author']
- 5Path depth= 4 segments
- 6Wildcard segments= 0
- 7Index bounds check= All indices are within bounds
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
When must I use bracket notation?
Whenever a key contains a dot, space, hyphen at the start, or any character that would break dot parsing. It is also required for keys that are purely numeric.
Are JSONPath indices zero-based?
Yes. [0] is the first element, so an array of twelve items has a maximum valid index of 11 - which is what the bounds check verifies.
Related Calculators
You might also need
- 2FA Setup CheckerAlso in Programming & Software
- Algorithm Complexity CalculatorAlso in Programming & Software
- Antivirus Plan CheckerAlso in Programming & Software
- API PaginationAlso in Programming & Software
- API Payload Size CalculatorAlso in Programming & Software
- API Quota CalculatorAlso in Programming & Software
