tableau de filtre JavaScript d'objets par tableau
var arr = [1,2,3,4],
brr = [2,4],
res = arr.filter(f => !brr.includes(f));
console.log(res);
Powerful Penguin
var arr = [1,2,3,4],
brr = [2,4],
res = arr.filter(f => !brr.includes(f));
console.log(res);
let ListA = [
{
id: 1,
name: 'Nayeem'
},{
id: 2,
name: 'Dalim'
},{
id: 3,
name: 'Mahfuz'
}
]
let ListB = [
{
id: 3,
name: 'Mahfuz'
}
]
let Users = ListA.filter((itemA)=> {
return !ListB.find((itemB)=> {
return item.id === itemP.id;
})
})
console.log(Users);