sort(function (a, b) { var dateA = new Date(a.drop_date), dateB = new Date(b.drop_date) return dateA - dateB }) code example
Example: javascript order array by date
const sortedActivities = activities.sort((a, b) => b.date - a.date)
const sortedActivities = activities.sort((a, b) => b.date - a.date)