ArrayOfObjectsFilterByKeyValue_v2 Op
There is a newer version of this op!
This version will not receive any updates. It is recommended to use a newer version.
Current version: Ops.Array.ArrayOfObjectsFilterByKeyValue_v3
Filter key-value pairs in objects in an array of objects
Summary (oneliner)
Use this op to "slim" an array of objects.
Only keep objects that have specified key-value pair!
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" }];
Full Name
- Ops.Array.ArrayOfObjectsFilterByKeyValue_v2
- Core Op - visible for everyone
- MIT
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
Op is missing in example patch!
Example Patch ArrayOfObjectsFilterByKeyValue ArrayOfObjectsFilterKeys ArrayOfObjectsToString Example
INPUT PORTS
Array (Array)
Array input
Filter Key (String)
key to use
Filter Value (String)
value to use
Invert Filter (Number: boolean)
invert result (discard all objects that have key-value pair)
OUTPUT PORTS
arrayOut (Array)
output array