Say I had an array like this (in its practical use, the objects would have data in, but for this example, I don't really need that).
js code:
var MyArr = [];
MyArr["X"] = {};
MyArr["Z"] = {};
MyArr["W"] = {};
MyArr["Y"] = {};
If I loop through that, it'll go in the written order (X, Z, W, Y). Is there a relatively simple way of sorting the keys alphabetically (like the PHP
ksort() function)?