beta
cables is under heavy development.
There might be one or another bug, please let us know about it!

ObjectGetArrayByPath Op

Ops.Json.ObjectGetArrayByPath


ObjectGetArrayByPath
Namespace: Ops.Json

Op author: stephan

returns the array at the position defined by a path


summary (oneliner)

useful when working with nested data structures.

the path defines the way to the array. the given array will be returned

given an object like this:

{
    "data": { 
        "persons": [ 
            {
                "name": "alyx"
            },
            {
                "name": "eli"
            },
            {
                "name": "gordon"
            }
        ] 
    }
}

a path of data.persons will result in this array:

 [ 
            {
                "name": "alyx"
            },
            {
                "name": "eli"
            },
            {
                "name": "gordon"
            }
        ] 


doc

issues

example patch id

youtube id

caniuse query

collections

related ops

Inputs

Object (Object)

json object


Path (String)

path to array (i.e. data.numbers)


Outputs

Output (Array)

array of values


Found (boolean Number)

Caught a mistake or want to contribute to the documentation?

Edit Documentationcancel save

ObjectGetArrayByPath - Example

Open Example In Editor


Patches using ObjectGetArrayByPath