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