this.listDataIn = data.Result.data; const uniqueItems: Item[] = Array.from( new Set(this.listDataIn.map(item => item.MyLandID)) ).map(id => { return obj.listDataIn.find(item => item.MyLandID === id); }); obj.listt = uniqueItems; console.log(uniqueItems);
标签:map,MyLandID,typescript,item,字段,数组,uniqueItems,id,listDataIn From: https://www.cnblogs.com/fuyao/p/17654025.html