I have this object:
a = {"formData": {
"total": "60.00",
"tr0_RTN": "PZH",
"tr0_amount": "10.00",
"tr2_RTN": "SUB",
"tr2_amount": "30.00",
"tr7_RTN": "KFC",
"tr7_amount": "20.00",
}};
How can I change the key sequence to this:
a = {"formData": {
"total": "60.00",
"tr0_RTN": "PZH",
"tr0_amount": "10.00",
"tr1_RTN": "SUB",
"tr1_amount": "30.00",
"tr2_RTN": "KFC",
"tr2_amount": "20.00",
}};
Anyway I could do this with native or lodash?