const array = [{id: 1, name: "hello"}, {id: 2, name: "hii"}, {id: 1, name: "hey"} ];
const cleanArray = array.reduce((unique, o) => {
if(!unique.some(obj => obj.id === o.id)) {
unique.push(o);
}
return unique;
},[]);