js數組對象去重

var arr = [] var peoples = [ {id:1,name:'wang'}, {id:2,name:'zhang'}, {id:2,name:'zhang'}, ] for(let val of peoples){ arr.push(val.id) } var newArr = []; var newArr2 = []; for(var i =0
相關文章
相關標籤/搜索