I know you can do something like
PHP Code:
temp.array = {"foo", "bar", "meow"};
array[0].test = 10;
array[1].test = 20;
array[2].test = 1;
temp.sortedArray = array.sortByValue("test", "float", true); // last parameter is ascending/descending, others should be obvious
echo(sortedArray);
// echos "meow, foo, bar"
If you're looking for long-term (or even short-term) storage of the data, you should look into SQLite usage. It's a lot easier and more efficient than any way to sort with GS2; it would be as simple as
Quote:
SELECT account, kills FROM kills ORDER BY kills DESC
|
You can also limit the amount returned without any GS2
Quote:
SELECT account, kills FROM kills ORDER BY kills DESC LIMIT 5
|