const getUsersByEyeColor = (arr, color) => arr.filter(user => user.eyeColor == color); let arrFilter = getUsersByEyeColor(users, "blue") console.log(arrFilter.map(el => el.name));