Parsing a json nested dictionary in python -
i need reach value "y "of "b" in result.
{ "response": { "result": [2] 0: { "a": "x" "b": "y" "c": "z" } 1: { "a": "d" "b": "e" "c": "f" "d": "g" } } }
my attempt ['response']['result'][0]['b'] produces given error
indexerror: list index out of range
any appreciated. thanks.
the key 0
not under "result"
should use ['response'][0]['b']
Comments
Post a Comment