I have an API whose response is json like this:
{
"a":1,
"b":2,
"c":[
{
"d":4,
"e":5,
"f":{
"g":6
}
}
]
}
How can I write a python program which will give me the keys ['d','e','g']. What I tried is:
jsonData = request.json() #request is having all the response which i got from api
c = jsonData['c']
for i in c.keys():
key = key + str(i)
print(key)
['d','e','g']or['d','e','f']keys?