I am working on a problem where i have a file of json objects given below:
{
"id": "111",
"name": {
"firstname": "Tamara",
"lastname": "Myers"
},
"address": {
"street": "20722 Coleman Villages,East Rose",
"zip": "71064-5894"
}
}
I want to convert it into:
{
"id": "111",
"name_firstname": "Tamara",
"name_lastname": "Myers",
"address_street": "20722 Coleman Villages,East Rose",
"address_zip": "71064-5894"
}
I am not able to do that because of the reason that we may have more fields in other json objects, which are not given in above example.
For example "Job":{"Engineer":"Junior","domain":"civil"}. And level of nesting is also irregular in all json objects.
address_streetkey is missing an ending"