I am trying to get unique objects within an array of objects. Let's say the object is like below.
values = [
{ id: 10, available: true },
{ id: 10, available: false },
{ id: 11, available: true },
{ id: 12, available: false }
];
unique objects should return like below: if duplicates objects contains available:true need available:true
result = [
{ id: 10, available: true },
{ id: 11, available: true },
{ id: 12, available: false }
];