I want to sort the following array of timestamps using lodash so the latest time stamp is first [3].
Code:
let timestamps = [\"2017-
How to sort an array of timestamps using lodash
This code is already sorting timestamps correctly using lodash:
const sorted = _.sortBy(timestamps);
just in ascending order, simply reverse the result using:
const sorted = _.sortBy(timestamps).reverse();