I have an array of objects and I want to get a new array from it that is unique based only on a single property, is there a simple way to achieve this?
Eg.
A better and quick approach
var table = [ { a:1, b:2 }, { a:2, b:3 }, { a:1, b:4 } ]; let result = [...new Set(table.map(item => item.a))]; document.write(JSON.stringify(result));
Found here