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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -