Is there a way to combine objects within the same array in Angular based on their names?
[{
"name":"Navin",
"id":"1"
},
{
"name":"Navin",
"mark1":"98"
},
{
"name":"Navin",
"mark2":"50"
}
]
The desired output should be:
[{
"name":"Navin",
"id":"1",
"mark1":"98",
"mark2":"50"
}]