Check if Array has exact Key Value object in Javascript
In modern browsers,
testArray.some(function(o){return o["key1"] === "value2";})
will be true
if pair is found, otherwise false
.
This assumes each object contains only one key/value pair, and that the value is never undefined
.