仅记录:
arr1=[{name:'1111',code:0},
{name:'1111',code:2}];
arr2=[ {name:'333',code:0}];
let arr = arr1(item => {
return !arr2.find(yn=> {
return yn.code== item.code
})
})
如上是两个json数组,此操作可以将arr1中code和arr2中code相同的项给过滤掉