I have this array:
var arr = []; arr.push({name:\"k1\", value:\"abc\"}); arr.push({name:\"k2\", value:\"hi\"}); arr.push({name:\"k3\", value:\"oa\"});
To answer your exact question you can get the exact behaviour you want by extending the Array prototype with:
Array.prototype.get = function(name) { for (var i=0, len=this.length; i
this will add the get() method to all arrays and let you do what you want, i.e:
arr.get('k1'); //= abc