📅  最后修改于: 2022-03-11 14:58:00.743000             🧑  作者: Mango
代码示例1
function unique(array, propertyName) {
return array.filter((e, i) => array.findIndex(a => a[propertyName] === e[propertyName]) === i);
}