i have an array of objects like below

```
   [ 
            {value: 1, id: 1, name: "x"},
            {value: 5, id: 1, name: "x"},
            {value: 1, id: 1, name: "y"},
            {value: 8, id: 1, name: "y"},
            {value: 1, id: 2, name: "x"},
            {value: 3, id: 2, name: "x"},
            {value: 1, id: 2, name: "y"},
            {value: 4, id: 2, name: "y"}
     ]

```

i want to guet the object with max value with the same "name" and "id"
and push it in a new array ,
the expected output is like this :

```
   [
     {value: 5, id: 1, name: "x"},
     {value: 8, id: 1, name: "y"},
     {value: 3, id: 2, name: "x"},
     {value: 4, id: 2, name: "y"},
   ]

```

thank you