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) { data[j].parent = true; } } mainData .push(data[i]) } } return mainData ; }
时间: 2024-11-03 03:35:37