title: How to use filter() with push() in the same function
body: <p>I would like to know if there would be a way to use the filter with the push in the same function, I tried here, but it didn't work</p>
  <p>here is an example of the code</p>
  <pre><code>          this.storeS.getItensByCateg(paramId).subscribe((resB: any) =&gt; {
          scrollTo(0, 300);
          this.slicedItems = [];
          for (let i = 0; i &lt;= 200; i++) {
            if (resB[i]) {
              this.slicedItems.push(resB[i]);
            }
              console.log(this.slicedItems.filter(item =&gt; item.status==='I'))
            }
  </code></pre>
  <p>In console.log the filter works normally, but in <code>push(resB[i])</code> it doesn't work</p>
  <p>the desired exit</p>
  <pre><code>estoque: null fotos: (6) ['8407.0', null, null, null, null, null] id: 8407 item_linkWeb: {id: 719, emp_id: 1, item_id: 8407, linkWeb_id: 693, updated_at: null, …} status: &quot;I&quot; tabela: {itemTabela_id: 4, item_id: 8407, vVenda: 212.9, vPromo: null, vPromoData: null}
  </code></pre>
  <p>But the output could also come with the status :&quot;A&quot;, so I need the filter <code>status==='I'</code></p>
  <pre><code>estoque: null fotos: (6) ['8407.0', null, null, null, null, null] id: 8407 item_linkWeb: {id: 719, emp_id: 1, item_id: 8407, linkWeb_id: 693, updated_at: null, …} status: &quot;A&quot; tabela: {itemTabela_id: 4, item_id: 8407, vVenda: 212.9, vPromo: null, vPromoData: null}
  </code></pre>