ArrayGetArrayValuesByPath Op

ArrayGetArrayValuesByPath

Outputs all the values of the properties of an array of objects given a path


useful to interate over nested data structures.

the path defines the way to the first object. this op will then try to iterate over the array that contains the object with the given property and return all the values fo each object in the array.

given an array like this:

[
    [
        {
            "firstName": "Gordon",
            "lastName": "Freeman"
        },
        {
            "firstName": "Eli",
            "lastName": "Vance"
        }
    ],
    [
        {
            "firstName": "Alyx",
            "lastName": "Vance"
        },
        {
            "firstName": "G",
            "lastName": "Man"
        }
    ]
]

a path of 0.0.firstName will result in this array:

[
  "Gordon",
  "Alyx",
]

Full Name
  • Ops.Data.JsonPath.ArrayGetArrayValuesByPath
Visibility
  • Core Op - visible for everyone
License
  • MIT
AuthorgithubMaintained by Team


INPUT PORTS


Array (Array)
Path (String)

path to first array field (i.e. "data.0.firstName")

OUTPUT PORTS


Output (Array)

array of values

Found (booleanNumber)

 

Patches using ArrayGetArrayValuesByPath

  • Examples
  • Public
  • My Patches

Changelog


cloned op from Ops.Json.ObjectGetArrayValuesByPathuser avatarcables - 2021-01-08 17:32
Ops.User.cables.ArrayGetArrayValuesByPath renamed to Ops.Json.ArrayGetArrayValuesByPathuser avatarcables - 2021-01-08 17:33
improvementchange errorlevels, show hint when no path provideduser avatarstephan - 2025-01-14 11:33
improvementchange "found" port to boolNum typeuser avatarstephan - 2025-03-07 14:37
improvementshow full path in extended titleuser avatarstephan - 2025-05-21 14:04