Created
November 19, 2013 08:01
-
-
Save nickarthur/7541892 to your computer and use it in GitHub Desktop.
ARRAY SORT CLOUDPARTY cloudparty
which sorts by the time in seconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ARRAY SORT CLOUDPARTY cloudparty | |
// Sort the total and current results lists by time | |
arraySort(resultsTotalArray, 'sortByTime'); | |
arraySort(resultsCurrentArray, 'sortByTime'); | |
// Sort the total and current results lists by time | |
arraySort(resultsCurrentArray, 'sortByTime'); | |
function sortByTime(a, b) { | |
return (a[2] < b[2] ? -1 : (a[2] > b[2] ? 1 : 0)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment