i have to sort a two dimensional array for google visualization api.
the unsorted data works fine.
structure of the unsorted array is:
i have to sort on the second element. as demonstrated above, first element is a string, second an integer, and this should remain so.
i use this function for sorting
but this turns the second element into a string. i didnt write the function (and i dont get it). where would i have to place parceInt() to make it work?
// this sorts the array using the second element
return ((a < b) ? -1 : ((a > b) ? 1 : 0));