So I have these items and it has some duplicated ID's but the values are different. It might be more items but currently I used these items for example. The array result is like this:
"items": [
{
"id": "E46",
"size": "5 Ounce"
},
{
"id": "E46",
"color": "Green"
},
{
"id": "E32",
"size": "8 Ounce"
},
{
"id": "E32",
"color": "Green"
},
{
"id": "E4G",
"size": "5 Ounce"
},
{
"id": "E4G",
"color": "Pink"
},
{
"id": "E3C",
"size": "8 Ounce"
},
{
"id": "E3C",
"color": "Pink"
}
]
I'd like combine these and make it look like this:
"items": [
{
"id": "E46",
"size": "5 Ounce"
"color": "Green"
},
{
"id": "E32",
"size": "8 Ounce"
"color": "Green"
},
{
"id": "E4G",
"size": "5 Ounce"
"color": "Pink"
},
{
"id": "E3C",
"size": "8 Ounce"
"color": "Pink"
}
]
If it's possible, Thanks: