I have an array with keys like ["1", "5", "9"]
And I have an object with the same keys, something like this: selections: { "5": {}, "12": {} }
What is the easiest way to get a boolean value out of it.
It should return true if any of the keys in the array is present in my object.
I am using angular and lodash, is there any smart solution for this or do I need to do a loop for it? And if I do a loop, what is the most efficient way?
_.every(["1", "2", "5"], function (id) { if (!_.includes(_.pluck(selections, "id"), id)) { return true; } });