This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
Yes you're right with the test, for now it's only a method, I fixed it in the code.
So what I'm trying to do is:
from an initial list of JSON objects (that has id, version and some data)
filter out only unique elements (id would be primary key), however out of those with the same id I want to choose latest (where version is highest).