title: return object length which includes key is true not false
body: <p>I want to write some filter logic where an object returns its length which includes only key having true value.</p>
  
  <pre><code>     $scope.generated.codesWithBalance = [A:true, B:true, C:false];
  </code></pre>
  
  <p>so for above object it should return length as 2. Since C is false so want to exclude in the count.</p>
  
  <p>But now whenever i try to get the length it returns total length</p>
  
  <pre><code>    Object.keys($scope.generated.codesWithBalance).length
  </code></pre>
  
  <p>Any way that i can avoid key having false value?</p>