From the following json, in python, I\'d like to extract the value \"TEXT\". All the keys are constant except for unknown. Unknown could be any string like \"a6784t66\" or \
You can use a recursive function to dig through every layer and print its value with an indent
def recurse_keys(df, indent = ' '):
'''
import json, requests, pandas
r = requests.post(...)
rj = r.json() # json decode results query
j = json.dumps(rj, sort_keys=True,indent=2)
df1 = pandas.read_json(j)
'''
for key in df.keys():
print(indent+str(key))
if isinstance(df[key], dict):
recurse_keys(df[key], indent+' ')
recurse_keys(df1)