array = [
{name:'alfa', firstValue:{value:'100'}},
{name:'alfa', secoundValue:{value:'200'}},
{name:'alfa', thirdValue:{value:'300'}}
]
I'm looking for a way to copy objects props into unique when the value name are the same, how can I do this, see expected result below:
array = [
{name:'alfa', firstValue:{value:'100'}, secoundValue:{value:'200'}, thirdValue:{value:'300'}},
]