//Sort Objects in array Descending order
const sortDesc(a,b) => {
return b.timestamp - a.timestamp;
}
//Sort Objects in array Ascending order
const sortAsc(a,b) => {
return a.timestamp - b.timestamp;
}
<Array>.sort(sortAsc);
<Array>.sort(sortDesc);