SOURCE

window.onload = () => {
    const myArr = [{id: 1, d: [{s: 'sss111'}]}, {id: 2, d: [{s: 'sss222'}]}, {id: 1, d: [{s: 'sss'}]}]

    function arrObjReduce(arr){
    const obj = {}
    return arr.reduce((cur, next) => {
        obj[next.id] ? '' : obj[next.id] = true && cur.push(next);
        return cur;
    },[])
    }

    console.log(JSON.stringify(arrObjReduce(myArr)))
}
console 命令行工具 X clear

                    
>
console