What is the best way to filter values in Angular or remove values based on their IDs? I need to delete data or objects from an array of objects where the ID is 5, 12, and 9.
In addition, we want to filter using multiple IDs, such as when the ID is 5, 12, and 9.
Something like:
let newArr = data.filter ...
#data
[
{
"id": 12,
"name": "Architect",
"isShow": true,
"transactionRoleId": 12
},
{
"id": 11,
"name": "Construction Project Director",
"isShow": true,
"transactionRoleId": 11
},
{
"id": 9,
"name": "COVP",
"isShow": true,
"transactionRoleId": 9
},
...
]