📅  最后修改于: 2022-03-11 14:59:52.488000             🧑  作者: Mango
const arrayOfObject = [{ id: 1, name: 'john' }, {id: 2, name: 'max'}];
const checkUsername = obj => obj.name === 'max';
console.log(arrayOfObject.some(checkUsername))