ObjectGetArrayValuesByPath Op

ObjectGetArrayValuesByPath

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 object like this:</p> <pre><code>{ &quot;data&quot;: [ { &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>data.0.firstName</code> will result in this array:</p> <pre><code>[ &quot;Gordon&quot;, &quot;Eli&quot;, &quot;Alyx&quot;, &quot;G&quot; ] </code></pre>


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


INPUT PORTS


Object (Object)

<p>json object</p>

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 ObjectGetArrayValuesByPath

  • Examples
  • Public
  • My Patches