I am trying to get all the parent / ancestor's name of a fields in a json array.
For suppose i have the following json array
{
"country abbreviation": "US",
"places": [
{
"place name": {
"state": "india",
"continent": "Asia"
},
"longitude": "-71.4594",
"post code": "02178",
"latitude": "42.4464"
},
{
"place name": "Belmont",
"longitude": "-71.2044",
"post code": "02478",
"latitude": "42.4128"
}
],
"country": "United States",
"place name": "Belmont",
"state": "Massachusetts",
"state abbreviation": "MA"
}
And if want to get the parent / ancestor's name of state then it should be "place/place name"
i am trying to do it using python, but can't understand the logic,can anyone help me. Using shell will also work, but primarily i want it in python.