title: Filter array object based on specific condition -typescript
body: <p>I want to filter array object <code>data</code> where <code>Failed</code> count greater than 0. My below code is NOT working</p>
  
  <pre><code>ngOnInit()
  {
    this.employeeService.getProducts().subscribe((data:any) =&gt; {
    console.log(data);
  
    this.products=data.Products.array.forEach(element =&gt; {
     i=&gt;i.Failed&gt;0
    });
  
    });
  }
  </code></pre>
  
  <p>These are classes for Products</p>
  
  <pre><code>export class Productlist {
      Products :Array&lt;Products&gt;
      Page:string
      PageSize:string       
  }
  
  export class Products{
      Platform:string
      Compliant:string
      Failed:string
  }
  </code></pre>