//第一种
            var hash = {};
            var Arr = newArr.reduce(function(arr, current) {
                hash[current.singerid] ? '' : hash[current.singerid] = true && arr.push(current);
                return arr
            }, [])
            //第二种
            const maps = new Map();
            console.log(newArr.filter((a) => !maps.has(a.singerid) && maps.set(a.singerid, 1)));

 

相关文章:

  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案