js 数组对象去重

unique(arr) {
      const res = new Map();
      return arr.filter(
        (arr) => !res.has(arr.startTimes) && res.set(arr.startTimes, 1)
      );
   },
posted @ 2021-08-05 21:38  起风了1573  阅读(50)  评论(0)    收藏  举报