I went totaly frustrated earlier when I tried to find a way to match key values to value in arrays (hashmap kind). But I couldn’t find any function for that in javascript. So I decided to write my own extension for the array in javascript. Here is the result. Mind you, it’s only in alpha release. Basic usage:

>> p = new Array();
[]
>> p.add('key', 'value');
0
>> p.add('ha', 'xxor');
1
>> p;
["value", "xxor"]
>> p.get('key');
"value"
>> p.remove('ha');
true
>> p;
["value"]

Download JavaScript Array extension