ArrayGetArrayValuesByPath Op

ArrayGetArrayValuesByPath

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


<p>useful to interate over nested data structures. </p> <p>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.</p> <p>given an array like this:</p> <pre><code>[ [ { &quot;firstName&quot;: &quot;Gordon&quot;, &quot;lastName&quot;: &quot;Freeman&quot; }, { &quot;firstName&quot;: &quot;Eli&quot;, &quot;lastName&quot;: &quot;Vance&quot; } ], [ { &quot;firstName&quot;: &quot;Alyx&quot;, &quot;lastName&quot;: &quot;Vance&quot; }, { &quot;firstName&quot;: &quot;G&quot;, &quot;lastName&quot;: &quot;Man&quot; } ] ] </code></pre> <p>a path of <code>0.0.firstName</code> will result in this array:</p> <pre><code>[ &quot;Gordon&quot;, &quot;Alyx&quot;, ] </code></pre>


Full Name
  • Ops.Data.JsonPath.ArrayGetArrayValuesByPath
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


INPUT PORTS


Array (Array)
Path (String)

<p>path to first array field (i.e. &quot;data.0.firstName&quot;)</p>

OUTPUT PORTS


Output (Array)

<p>array of values</p>

Found (

<i>boolean</i>

Number)


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