how can i sort this array by timestamp and what is the fastest way (array has many many entries)?
my array
myList = new Arra
myList.sort(function(x, y){
return x.timestamp - y.timestamp;
})
myList is a JavaScript array, which supports the sort method. This method accepts a function as argument, which sorts the array according to the returned value.
Currently, the sort algorithm will place the element with the lowest timestamp first. Swap x.timestamp and y.timestamp if you want to sort the array in the other direction.