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
}, [])

相关文章:

  • 2022-12-23
  • 2021-08-22
  • 2021-10-08
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
相关资源
相似解决方案