判断数组对象某个值是否存在

boxList[boxItem].boxRelations.some(item => {
            if (item.product.id === productId) return true;
          })

 

posted @ 2022-08-09 11:54  ㊀觉睡到小时候  阅读(86)  评论(0)    收藏  举报