title: How to count a boolean value from a map
body: <p>Used Framework is Angular 8</p>
  <p>I have an array called <code>teams</code> of which i can get the length by using <code>teams.length</code> .
  Now <code>teams</code> has a map called <code>teamInfo</code> for each count. This teamInfo map has again a boolean value <code>isClosed</code> that can be accessed by <code>teams.teamInfo.isClosed</code> for each count, when jsoning it into the ngforloop, which is</p>
  <pre><code>*ngFor=&quot; let teamID of JSObject.keys(teams); trackBy: trackByFn
  
  &lt;app-team-card
  [team]=&quot;teams[teamID]&quot;
  [isClosed]=&quot;teams[teamID].teamInfo.isClosed&quot;&gt;
  &lt;/app-team-card&gt;
  </code></pre>
  <p>My goal is to get the number of all maps that have <code>isClosed =true.</code> My attempt was</p>
  <pre><code>getClosedTeams(teams) {
           let closedTeams = teams.teamInfo.filter((isClosed) =&gt; {
               return isClosed.select == true;
          });
          console.log(closedTeams.length);
      }
  </code></pre>