I am trying to get duplicate objects within an array based on 2 properties. Let's say the object is like below.
let arry = [
{Level: "A-1", Status: "approved"},
{Level: "A-2", Status: "approved"},
{Level: "A-3", Status: "approved"},
{Level: "A-4", Status: "reject"},
{Level: "A-5", Status: "reject"},
{Level: "A-1", Status: "approved"},
{Level: "A-2", Status: "approved"},
{Level: "A-6", Status: "approved"},
{Level: "A-7", Status: "reject"},
{Level: "A-1", Status: "approved"},
{Level: "A-6", Status: "approved"},
]
Duplicate objects should return and only the Status "approved" once like below:
[
{Level: "A-1", Status: "approved"},
{Level: "A-2", Status: "approved"}
]