js以数组值寻找对应id的name
let newTargetKeys = [42,43];
this.projectNameList = [{name:name1,id:42},
{name:name2,id:43}
]
let labelArr = []; this.projectNameList.forEach((item) => { newTargetKeys.forEach((item2) => { if (item.id == item2) { labelArr.push(item.name); } }); });