JS ES6 对象数组根据某些属性去重
JS ES6 对象数组根据某些属性去重
function distinctObjList(list, ...args){
let dataList = list.reverse()
const res = new Set()
if (args.length !== 0){
dataList = dataList.filter((it,index,self)=>{
let obj = {}
原创
2021-08-21 23:34:59 ·
368 阅读 ·
0 评论