I have two JSON Objects like this:
First one:
[{
"id": 5001,
"count": "0",
"type": "None"
},
{
"id": 5002,
"count": "0",
"type": "Glazed"
},
{
"id": 5005,
"count": "0",
"type": "Sugar"
},
{
"id": 5003,
"count": "0",
"type": "Chocolate"
},
{
"id": 5004,
"count": "0",
"type": "Maple"
},
{
"id": 5009,
"count": "0",
"type": "Juice"
}]
Second one:
[{
"id": 5001,
"count": "1"
},
{
"id": 5002,
"count": "10"
},
{
"id": 5005,
"count": "20"
},
{
"id": 5003,
"count": "70"
},
{
"id": 5004,
"count": "50"
},
{
"id": 5009,
"count": "0"
}]
How can I combine these two JSON Objects like:
[{
"id": 5001,
"count": "1",
"type": "None"
},
{
"id": 5002,
"count": "10",
"type": "Glazed"
},
{
"id": 5005,
"count": "20",
"type": "Sugar"
},
{
"id": 5003,
"count": "70",
"type": "Chocolate"
},
{
"id": 5004,
"count": "50",
"type": "Maple"
},
{
"id": 5009,
"count": "0",
"type": "Juice"
}]
Please help me, Thanks in advance.