What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Sort array by keys...

[?] Sort array by keys...
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. RE: [?] Sort array by keys...
That's kind of what I've thought.  :P  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.

This post was edited on 07-23-2010 at 07:25 PM by whiz.
07-23-2010 07:18 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Sort array by keys... - by whiz on 07-23-2010 at 06:30 PM
RE: [?] Sort array by keys... - by roflmao456 on 07-23-2010 at 07:01 PM
RE: [?] Sort array by keys... - by Adeptus on 07-23-2010 at 07:12 PM
RE: [?] Sort array by keys... - by Eljay on 07-23-2010 at 07:13 PM
RE: [?] Sort array by keys... - by whiz on 07-23-2010 at 07:18 PM
RE: [?] Sort array by keys... - by Matti on 07-30-2010 at 07:47 PM
RE: [?] Sort array by keys... - by whiz on 07-31-2010 at 09:46 AM
RE: [?] Sort array by keys... - by Matti on 07-31-2010 at 12:56 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On