JS数组对象去重方法
2018-06-24 本文已影响0人
noyanse
let letterArr = this.alpha.concat(this.letters)
let result = letterArr.reduce((result,item) => {
result[item["letter"]] = item;
return result;
},{})
this.handleLetters = result;