const matterList = [
{label: 1, value: "Alice" },
{ label: 2, value: "Bob" },
{ label: 3, value: "Charlie" },
{ label: 4, value: "David" },
];
const matterListIDs = ["Alice", "Charlie"];
const AA= matterList.filter(obj => matterListIDs.every(item => item !== obj.value))
console.log(AA)
const matterListIDs = ["Alice", "Charlie","Alice"]
const newMatterListID = []
matterListIDs.forEach(item => {
if (newMatterListID.indexOf(item) === -1) {
newMatterListID.push(item)
} else {
return console.log('aa')
}
})
console.log(newMatterListID)