ArrayOfObjectsFilterByKeyValue Op
filter key value pairs in objects in an array of objects
Summary (oneliner)
<p>Use this op to "slim" an array of objects.</p> <p>Only keep objects that have specified key-value pair!</p> <pre><code>var arr = [ { animal: "dog", food: "veggies" }, { animal: "cat", food: "bird" }, { animal: "bird", food: "veggies" } ];
// specifying key value pair food, veggies, the resulting array becomes
arr = [{ animal: "dog", food: "veggies" }, { animal: "bird", food: "veggies"}];
// inverting the operation, the array becomes
arr = [{ animal: "cat", food: "bird" }]; </code></pre>
- Ops.Array.ArrayOfObjectsFilterByKeyValue
- Core Op - Official cables op
- MIT
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
Example Patch ArrayOfObjects ops example
INPUT PORTS
<p>Array input</p>
<p>key to use</p>
<p>value to use</p>
<i>boolean</i>
)<p>invert result (discard all objects that have key-value pair)</p>
OUTPUT PORTS
<p>output array</p>