📌  相关文章
📜  检查对象数组的属性 - Javascript 代码示例

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

代码示例1
const arrayOfObject = [{ id: 1, name: 'john' }, {id: 2, name: 'max'}];

const checkUsername = obj => obj.name === 'max';

console.log(arrayOfObject.some(checkUsername))