const data = [
{
status: "ESCALTED",
name: "A1",
ack: true
},
{
status: "ESCALTED",
name: "A2",
ack: true
},
{
status: "CLOSED",
name: "A3",
ack: true
},
{
status: "NEW",
name: "A4",
ack: false
},
{
status: "NEW",
name: "A5",
ack: true
}
];
What I'm trying to filter all the objects with ack property equal to true and if the status is CLOSED or ESCALATED, it should be removed.
The output should be like this:
[{
status: "NEW",
name: "A5",
ack: true
}]