var replace_data = that.data.goods_jihe var result = []; //去重后的数组对象集合 var hash = {}; for (var i = 0; i < replace_data.length; i++) { var elem = replace_data[i].sequence; if (!hash[elem]) { result.push(replace_data[i]); hash[elem] = true; } }
原文链接:https://www.it610.com/article/1282661719264477184.htm