let exampleArray =
[{id:28, container: json},
{id:52, container: json},
{id:28, container: json}];
const uniqueArray = [...new Set(exampleArray.map(item => item.id))] // [28, 52]
Let
container: json
SCArr
addid
cc
'false'
...
const uniqIds = new Set();
const result = exampleArray.filter(({ id }) => {
if (uniqIds.has(id)) {
return false;
}
uniqIds.add(id);
return true;
});