function findUsersByName(users, name) { let arr = []; for (const obj of users) { let str = obj.name; if (name === str) arr.push(obj); } return arr; }