I have an array of objects, each object contains n key/value pairs. I need to return an array of the objects which has a value matching x.
Using Underscore.js I could use _.findWhere however I don't know what key the value will be under.
I could obviously loop the array, fetch all of the keys in each object, then run _.findWhere on each key and check if the value is there, but it doesn't seem like a good way of doing this.