const sortedActivities = activities.sort((a, b) => b.date - a.date)
arr = arr.sort(function (a, b) {
var dateA = new Date(a.date_prop).getTime();
var dateB = new Date(b.date_prop).getTime();
return dateA < dateB ? 1 : -1;
});
array.sort(function(a,b){return a.getTime() - b.getTime()});