var ids = [
{id:'1',name:'1'},
{id:'3',name:'3'}
]
var idList = [
{id:'1',name:'1'},
{id:'2',name:'2'},
{id:'3',name:'3'},
{id:'4',name:'4'},
]
var list = idList.filter(item => !ids.some(o => o.id === item.id))
console.log("list",list)
js 两个数组间去重
最新推荐文章于 2024-06-01 07:27:22 发布