title: Rxjs6 - filter array of objects
body: <p>I would filter array of objects using RXJS operator <code>filter</code></p>
  
  <p>I've array of objects like this single one:</p>
  
  <pre><code>    {
        id: string,
        count: number
      }
  </code></pre>
  
  <p>I would get objects which <code>count &gt; 20</code></p>
  
  <p>I tried:</p>
  
  <pre><code>  getVotes2(): Observable&lt;Vote&gt; {
      return this._http.get&lt;Vote&gt;(url)
       .pipe(
         map( results =&gt; results ),
         filter( result =&gt; result.count&gt;20 )
       );
    }
  </code></pre>
  
  <p>next, without <code>map</code> and I always get all records.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>---------CORRECT CODE------------</strong></p>
  
  <pre><code>getVotes2(): Observable&lt;Vote[]&gt; {
   return this._http.get&lt;Vote[]&gt;(url)
    .pipe(
      map( results =&gt; results.filter( r =&gt; r.count &lt; 20) )
    )
  }
  </code></pre>