I am trying to filter the array object data
where the count of Failed
is greater than 0. Unfortunately, the code below is not working as expected.
ngOnInit()
{
this.employeeService.getProducts().subscribe((data:any) => {
console.log(data);
this.products=data.Products.array.forEach(element => {
i=>i.Failed>0
});
});
}
Here are the classes for Products:
export class Productlist {
Products :Array<Products>
Page:string
PageSize:string
}
export class Products{
Platform:string
Compliant:string
Failed:string
}