I have list of object from my api, I want to display the latest value,
Here's how I got my location 3.
records.forEach((record) => {
if (record.location == locationId) {
result.push(record);
}});
But now I want to get the latest record from it.
Any help would be very thankful!