筛选掉重复的数据
2020-03-02 本文已影响0人
李大鱼_
productList = productList.reduce(function (item, next) {
hash[next.name] ? '' : hash[next.name] = true && item.push(next);
return item
}, [])
productList = productList.reduce(function (item, next) {
hash[next.name] ? '' : hash[next.name] = true && item.push(next);
return item
}, [])