Here's an array of strings for reference:
const strings = [
"author:app:1.0.0",
"author:app:1.0.1",
"author:app2:1.0.0",
"author:app2:1.0.2",
"author:app3:1.0.1"
];
I need to filter them so that only the latest versions for each "author:name" are retained, removing older ones (e.g., "1.0.1").
The expected result should look like this:
const filteredStrings = [
"author:app:1.0.1",
"author:app2:1.0.2",
"author:app3:1.0.1"
];
Is there a simple way to achieve this?