1 去重 //去重复,需要额外定义一个List public static void RemoveRepeat(List arrs) { List tmp = new ArrayList(); Iterator it = arrs.iterator(); while (it.hasNext()) { int a = it.next(); if (tmp.contains(a)) i
话不多说,请看代码:
function removeRepeat(data) {
var temp = "";
var mainData = [];
for (var i = 0; i < data.length; i++) {
if (!data[i].parent) {
temp = data[i];
for (var j = 0; j < data.length; j++) {
if (temp.DeliveryType == data[j].DeliveryType) {