beta
cables is under heavy development.
There might be one or another bug, please let us know about it!
ArrayOfObjectsFilterByKeyValue
Ops.Array.ArrayOfObjectsFilterByKeyValue
Namespace: Ops.Array
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" }];

doc

issues

youtube id

collections

related ops

Inputs

Array (Array)

Array input


Filter Key (String)

key to use


Filter Value (String)

value to use


Invert Filter (boolean / Number)

invert result (discard all objects that have key-value pair)


Outputs

arrayOut (Array)

output array


Caught a mistake or want to contribute to the documentation?

Edit Documentationcancel save
ArrayOfObjects ops example:


Credits


Changelog


created op
2020-04-14 - simod

Ops.User.simod.ArrayOfObjectsFilterByKey renamed to Ops.User.simod.ArrayOfObjectsFilterByKeyValue
2020-04-14 - simod

Ops.User.simod.ArrayOfObjectsFilterByKeyValue renamed to Ops.Array.ArrayOfObjectsFilterByKeyValue
2020-04-14 - simod

Examples using ArrayOfObjectsFilterByKeyValue

Public Patches using ArrayOfObjectsFilterByKeyValue