That's kind of what I've thought.
I can't test it now, but this should work, right?
js code:
var Arr = [];
// yeah, we know there's stuff in it
var Sort = [];
for (var K in Arr)
{
Sort.push(K);
}
Sort.sort();
var New = [];
for (var X in Sort)
{
New[Sort[X]] = Arr[Sort[X]];
}
Edit: no, that's wrong!
There.