📌  相关文章
📜  如何在javascript代码示例中的对象数组中查找重复项

📅  最后修改于: 2022-03-11 15:03:41.209000             🧑  作者: Mango

代码示例2
var yourArray = [

{Index: 1, Name: "Farley, Charley", EmployeeCode: "12", PaymentType: "Void", CheckDate: "01/04/2012"},
{Index: 2, Name: "Farley, Charley", EmployeeCode: "12", PaymentType: "Void", CheckDate: "01/04/2012"},
{Index: 3, Name: "Tarley, Charley", EmployeeCode: "12", PaymentType: "Void", CheckDate: "01/04/2012"}
];

   unique = [...new Set(yourArray.map(propYoureChecking => propYoureChecking.Name))];
if (unique.length === 1) {
console.log(unique);
}