"data": {
"advance_amount": [],
"collection_report": [
{
"value": 7,
"date": "2018-07-10",
"paid_amount": "3510",
"totalAmount": 4550,
"pending_amount": 990
},
{
"value": 8,
"date": "2018-08-01",
"paid_amount": "1998",
"totalAmount": 7255,
"pending_amount": 3986
},
{
"value": 9,
"date": "2018-09-14",
"paid_amount": "1157",
"totalAmount": 2272,
"pending_amount": 1046
},
{
"advance_amount": "25"
},
{
"advance_amount": null
},
{
"advance_amount": "5225"
}
This is my response. But I want to append those advance amount in each collection_report after pending amount.
In this way
"value": 7,
"date": "2018-07-10",
"paid_amount": "3510",
"totalAmount": 4550,
"pending_amount": 990,
"advance_amount": 123,
123?