📅  最后修改于: 2022-03-11 15:03:42.898000             🧑  作者: Mango
arr.reduce((acc, current) => {
const x = acc.find(item => item.id === current.id);
if (!x) {
return acc.concat([current]);
} else {
return acc;
}
}, []);