📌  相关文章
📜  对象数组如何检查属性是否重复 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:17.786000             🧑  作者: Mango

代码示例2
const arrayOfObjCopy = [...arrayOfObj];

Object.keys(arrayOfObjCopy).forEach((key) => {
  arrayOfObjCopy[key] = JSON.stringify(arrayOfObjCopy[key]);
 });

const arrayOfObjhasDuplicates = uniq(arrayOfObjCopy).length != arrayOfObjCopy.length;