Here is the object structure I currently have:
{
DepositAmt_0: 133
DepositAmt_1: 455
DepositAmt_2: 123
DepositNotes_0: "some notes "
DepositNotes_1: "some comment"
DepositNotes_2: "some comment"
PayReference_0: "aaa"
PayReference_1: "bbb"
PayReference_2: "qwerty"
PaymentType_0: "payment"
PaymentType_1: "card"
PaymentType_2: "card"
}
This object is being received when the form is submitted.
I need a way to transform this object into the following format:
[
0:{DepositAmt:123, DepositNotes:"some notes", PayReference : "aaa", PaymentType:"payment"},
1:{DepositAmt:455, DepositNotes:"some comment", PayReference : "bbb", PaymentType:"card"},
2:{DepositAmt:123, DepositNotes:"some comment", PayReference : "qwerty", PaymentType:"card"},
]