JavaScript
var myArray = [{key: "key1", value: "value1"},{key: "key1", value: "value1"}];
Is there an elegant mechanism for determining if "key1" is present ?
In other words, a better mechanism than iterating through all array elements and checking each one.
Edit:
(1) keys are not necessarily unique
(2) array must be composed of key-value pairs because I need to extract KVP subsets into other arrays , re-order , de-dupe , and many other complex operations
Please re-open this question, thanks.