Getting Latest Date From Array of Objects in Javascript

Let’s say I have an array of objects, like so: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 let trades = [ { id: 1, date: "2019-04-23T18:25:43.511Z", asset: "BTC", orderType: "Limit Buy", platform: "Coinhako", price: 46580, price_denom: "USD", nominal_price: 32313 , amt: 0.003, value: 139.74, value_denom: "USD", fees: 4, fees_denom: "USD", comments: "good buy" }, { id: 2, date: "2019-05-23T18:25:43.511Z", asset: "BTC", orderType: "Limit Buy", platform: "Gemini", price: 38000, price_denom: "USD", nominal_price: 32313, amt: 0.02, value: 760, value_denom: "USD", fees: 14, fees_denom: "USD", comments: "not bad buy" }, { id: 3, date: "2019-05-23T18:25:43.511Z", asset: "Alibaba", orderType: "Limit Buy", platform: "SC", price: 196, price_denom: "HKD", nominal_price: 34.07, amt: 100, value: 19600, value_denom: "HKD", fees: 128, fees_denom: "HKD", comments: "bad buy" } ] I want to get the latest date. ...

August 25, 2021 · 2 min · Lei