let val = 1; let list = [{id:1,name:'张三'},{id:2,name:'李四'},{id:3,name:'王五'}, ];let arr = list.filter((i) => {return val == i.id; });