How can I get all the values in an array of this nested object:
{
"report": {
"firstSection": {
"totalIncome": 9650000,
"category": null,
"mustPay": null,
"tax": null,
"bef": null,
"message": "Los ingresos exceden el monto máximo para la modalidad monotributo"
},
"secondSection": {
"subTotals": {
"intTotal": 6295.166666666666,
"ordTotal": 3884679.201041667
},
"unitaryProductionCost": 247.55291005291008,
"unitaryInfo": {
"unitarySalesCost": 16338.425925925927,
"unitarySalesPrice": 23536.585365853658
},
"bankDebts": 0,
"monthlySimpleDepreciation": 173333.33333333334
},
}
};
Basically I want an array like this, only with the values:
{
"report": [
9650000,
null,
null,
null,
null,
"Los ingresos exceden el monto máximo para la modalidad monotributo",
6295.166666666666,
3884679.201041667,
247.55291005291008,
16338.425925925927,
23536.585365853658,
0,
173333.33333333334,
]
}
I have this repl.it if it helps https://repl.it/@lizparody/UnlinedCruelResearch Thank you!