数组对象通过filter+findIndex去重

Posted 青袂婉梦

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了数组对象通过filter+findIndex去重相关的知识,希望对你有一定的参考价值。

            this.tableList = this.tableList.result.filter((value, index, array) =>

              return array.findIndex(item => item.user_name === value.user_name) === index

            )

以上是关于数组对象通过filter+findIndex去重的主要内容,如果未能解决你的问题,请参考以下文章