📌  相关文章
📜  在对象数组中搜索现有值 - 无论代码示例

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

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

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

console.log(arrayOfObject.some(checkUsername))