想把下图中数组对象的code值为46的对象单独拿出来 有没有什么快速好用的方法?
const obj = dataMapList.find((ele) => ele.code === 46);
数组api find 很香
let data = [{key:1,code:2},{key:2,code:23},{key:3,code:46},{key:4,code:46}] data.filter((res)=>{ return res.code === 46 })