How do you return objects in an array if it contain specific key-value pairs?
I need to return it if it has all key value pairs given, not just one.
for example,
This function with the array of objects as the 1st argument, and an object with given key value pairs as the 2nd argument
whatIsInAName([{ "a": 1, "b": 2 }, { "a": 1 }, { "a": 1, "b": 2, "c": 2 }], { "a": 1, "b": 2 });
should return
[{ "a": 1, "b": 2 }, { "a": 1, "b": 2, "c": 2 }]