JSON calculates the difference level according to the field

let A = [{id:1,num:2},{id:5,num:12},{id:10,num:4132},{id:55,num:42}]
let B = [1,10]

problem description: filter the corresponding value of the id field in An according to each element in the B array, and delete if the same. Expect the following:

  [{id:5,num:12},{id:55,num:42}]
Es6
Apr.25,2021

how about this?

A.filter((obj)=>{
    return B.indexOf(obj.id)<=-1;
})

let A = [{id: 1, num: 2}, {id: 5, num: 12}, {id: 10, num: 4132}, {id: 55, num: 42}]
let B = [1, 10]

let C = A.filter(({id}) => B.indexOf(id) === -1);

console.log(C)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf49fc-31f08.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf49fc-31f08.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?