const arrayOfObject = [{ id: 1, name: 'john' }, {id: 2, name: 'max'}]; const checkUsername = obj => obj.name === 'max'; console.log(arrayOfObject.some(checkUsername))