Reading around i've discovered that Javascript associative arrays returns unpredictable results, i.e. length param is not correctly handled.
Array object should be used only with a numeric index and best way to avoid this problem is to use Object.
But, if I wanna put more objects in my object?
Of course i can do this with previous method, but i don't like it :-P. So, i've written a 100% OOP class, that use Prototype and it simulate a java HashMap.
I've also implemented an exception handling.
A little example:
I hope this is useful for you, of course I've attached source code.

for(var x in this.oStruct){ //add test for invalid key if(this.oStruct[x] != undefined){ returnArray[i] = x; i++; } }