对象数组根据某项取出对应对象

2019-07-12  本文已影响0人  Sasoli
const obj = arr.find(item => {
  return item.id === 1
})
console.log(obj)
上一篇 下一篇

猜你喜欢

热点阅读