ArrayUnique Op

ArrayUnique

filters an array for duplicate items and returns all unique items in a new array


<p>when given an array with &quot;non&quot; unique items, like:</p> <pre><code class="language-javascript">const a = [ &quot;maus&quot;, &quot;hund&quot;, &quot;maus&quot;, &quot;katze&quot;, &quot;maus&quot;, ]; </code></pre> <p>will return only the unique values in that array, as a new array, so:</p> <pre><code class="language-javascript">const a = [ &quot;hund&quot;, &quot;katze&quot;, &quot;maus&quot;, ]; </code></pre>


Full Name
  • Ops.Array.ArrayUnique
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


Example Patch ArrayUnique example

simple example for the ArrayUnique Op

Open In Editor

INPUT PORTS


array (Array)

<p>input array</p>

Format index (Number:

<i>integer</i>

)

<p>choose between 3 different unique modes: x, xy, xyz</p>

Format (String)

<p>choose between 3 different unique modes: x, xy, xyz</p>

OUTPUT PORTS


arrayOut (Array)

<p>deduped array output</p>

Array Length Out (Number)

<p>length of the new array</p>


Patches using ArrayUnique

  • Examples
  • Public
  • My Patches