treepath()treepath()
枚举可标识动态对象中所有遗留内容的路径表达式。Enumerates all the path expressions that identify leaves in a dynamic object.
treepath(
动态对象)
treepath(
dynamic object)
返回Returns
路径表达式的数组。An array of path expressions.
示例Examples
表达式Expression | 计算结果Evaluates to |
---|---|
treepath(parse_json('{"a":"b", "c":123}')) |
["['a']","['c']"] |
treepath(parse_json('{"prop1":[1,2,3,4], "prop2":"value2"}')) |
["['prop1']","['prop1'][0]","['prop2']"] |
treepath(parse_json('{"listProperty":[100,200,300,"abcde",{"x":"y"}]}')) |
["['listProperty']","['listProperty'][0]","['listProperty'][0]['x']"] |