I have the below list of object:
var data = [
{
"AcctId": 100,
"Value": true
},
{
"AcctId": 200,
"Value": false
}
]
I want to select distinct AcctId like this:
Output: [100, 200]
I've tried to use the angular filter method:
var newData = data.filter(r => r.AcctId);
But, it's returning the same list as input. can anyone please guide me on what I'm doing wrong?