Hey Jeff,
id you want to have a associative array, use a plain JavaScript object.

var myhash = {};

// insert
myhash["key"] = "value";
myhash[object] = secondObject;  // object will converted to a string in this
case!

// delete 
delete myhash["key"];

// exist
myhash["key"] != undefined

The problem comes in with sorting. JavaScript objects do not have an order
because they are sets of data. So sorting is not supported by objects.
And you still have to create the objects on the second level by hand if you
need them.

myhash["key"] = {};
myhash["key"]["second"] = 123;

But thats the way JS works.
Regards,
Martin



-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Something-like-a-hash-in-perl-tp5309198p5311506.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to