js 根据id获取数组中对应的对象
const id = xxx
let obj = array.find(function (e) {
return e.id=== id
})
console.log('obj', obj)
const id = xxx
let obj = array.find(function (e) {
return e.id=== id
})
console.log('obj', obj)