数组属性去重
//去重复
unique(arr1) {
const res = new Map();
return arr1.filter((a) => !res.has(a.level) && res.set(a.level, 1))
},
uniqueFun(arr, type) {
const res = new Map();
return arr.filter((a) => !res.has(a[type]) && res.set(a[type], 1));
}
https://blog.csdn.net/weixin_42232156/article/details/121822723
择善人而交,择善书而读,择善言而听,择善行而从。