title: Filter nested objects javascript
body: <p>I can't get to solve this exercise</p>
  <p>The called function receives as an argument an object 'guests', in the object we have objects that represent the guests at a party where they all have an &quot;age&quot; property.
  You must return the number of guests who are under 18</p>
  <p>In the following example it should return 2</p>
  <p>I tried to solve it in several ways, at the moment it goes like this:</p>
  <pre><code>function howManyMinors(guest) {
      let guests = {
      Luna: {age: 25},
      Sebastian: {age: 7},
      Mark: {age: 34},
      Nick: {age: 15}
      };
        
      var minors = 0;
      for(element in guests) {
          if(Object.values(guests) &lt;= 18) {
              minors ++;
          }
      }
      return minors;
  }
  </code></pre>