let letterArr = this.alpha.concat(this.letters)
let result = letterArr.reduce((result,item) => {
result[item["letter"]] = item;
return result;
},{})
this.handleLetters = result;
let letterArr = this.alpha.concat(this.letters)
let result = letterArr.reduce((result,item) => {
result[item["letter"]] = item;
return result;
},{})
this.handleLetters = result;
本文标题:JS数组对象去重方法
本文链接:https://www.haomeiwen.com/subject/ndajyftx.html
网友评论