js根据对象的属性值进行数组去重
//第一种 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)));