What is a fast way of making a Javascript array unique by attribute?
I have an array sorted by timestamp, like this:
[
{
ts: 1417048100,
release: 1.0
},
{
ts: 1417046900,
release: 1.1
},
{
ts: 1417046712,
release: 1.0
}
]
And I want to make it unique by release number, keeping only the ones with the latest timestamp. In my example, that would mean removing the last entry since there is a newer one for that release.