[Solved] What would be the best way to sort events according to its date
First you need to convert it to an array: var events = Object.keys(obj).map((key) => { return Object.assign({}, obj[key], {eventName: key}); }); Then you need to group them by date. We can do this with lodash. var groupBy = require(‘lodash/collection/groupBy’); var eventsWithDay = events.map((event) => { return Object.assign({}, event, {day: new Date(event.date).setHours(0, 0, 0, 0)) }); … Read more