Scalar FunctionsDynamic / JSON Functions
treepath
Enumerate the JSON paths (in bracket notation) reachable inside a dynamic value. Each bag key contributes `['key']`; each array contributes a single `[0]` describing its shape (not every index). Returns an empty array for nulls, scalars, and empty property bags.
Syntax
treepath(object)Parameters
Prop
Type
Returns: dynamic
Examples
Example 1
print array_sort_asc(treepath(dynamic({"a":1, "b":{"c":2, "d":[10, 20]}})))| print_0 (dynamic) |
|---|
| ["['a']","['b']","['b']['c']","['b']['d']","['b']['d'][0]"] |