title: filter array method javascript
body: <p>could you please tell me why my script is broken?
  It is an exercise in a Udemy lesson.
  You need only returning users who have admin level access</p>
  
  <pre><code>var users = [
   { id: 1, admin: true },  
   { id: 2, admin: false },
   { id: 3, admin: false },
   { id: 4, admin: false },
   { id: 5, admin: true },
  ];
  
  var filteredUsers;
  
  function isAdmin(array, property){
       return array.filter(function(key){
          return key[property] === 'true';
  })
  }
  
  filteredUsers = isAdmin(users, 'admin');
  </code></pre>
  
  <p>Thank you</p>