es6语法中删除数组对象中account值相同的一个对象

var chatList = this.data.chatList var hash = {}; chatList = chatList.reduce(function (item, next) { hash[next.account] ? ” : hash[next.account] = true && item.push(next); return item }, [])
相关文章
相关标签/搜索