过滤掉某个数组对象中 属性全部为某个值的 数组元素

JS数组操作方法

问题: 过滤掉某个数组对象中 属性全部为某个值的 数组元素

涉及的问题是 数组嵌套对象再嵌套数组

const newData = aList &&
      aList.filter(
        item => !(item.iList.every(({ state }) => state === 2) && item.iList.length > 0)
      );
console.log(newData)

发布了102 篇原创文章 · 获赞 202 · 访问量 40万+

猜你喜欢

转载自blog.csdn.net/zr15829039341/article/details/90315324