Sorting Array
Sorting an Array
Looks like we don't have access to:
'array.sort(function(a,b) { return a < b; });'
Started with Titanium today, haven't figured out how to sort a Table List yet.
1 Answer
-
Accepted Answer
this worked for me, but it was for an object with a "timestamp" property
tmpData.sort(compareTime); function compareTime(a, b) { return b.timestamp - a.timestamp; }