Find a value within nested json dictionary in python
问题 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 "hobvp*nfe". The value of unknown is not known , only that it will be in that position in each json response. { "A": { "B": { "unknown": { "1": "F", "maindata": [ { "Info": "TEXT" } ] } } } } one line json '{"A":{"B":{"unknown":{"1":"F","maindata":[{"Info":"TEXT"}]}}}}' How would you get the value of "Text"? (I know how to load