I have an array like this:
const arr = [
{
groupname:'xyz',
members:[{
0: "alex",
1: "john"
}]
},
{
groupname:'abc',
members:[{
0: "khalifa",
1: "julia"
}]
}
];
I need to filter the members
array. For example, within the members array, I need to get only the entires with the julia
.
I tried like this but its showing empty array.
this.groups.filter(x => x.members === this.membername)