I have the following function
getMyList(id:number){
this.subCatSvs.getList(id)
.subscribe(List => {
this.List = List;
});
};
The output of this function is:
[
{
"id": 678,
"name": "Bench",
"type": "furniture",
},
{
"id": 679,
"name": "Chair",
"type": "furniture",
},
{
"id": 677,
"name": "Stool",
"type": "furniture",
},
{
"id": 679,
"name": "Chair",
"type": "furniture",
},
{
"id": 680,
"name": "Car",
"type": "Vehicle",
},
{
"id": 681,
"name": "Van",
"type": "Vehicle",
},
]
How can I modify my function to be able to filter date by "type"? For example, I just want my output to show vehicle. Thanks for your help.
AJ