这是一个创建于 2494 天前的主题,其中的信息可能已经有所发展或是发生改变。
返回数据为
{'retCode': '0000000', 'retMsg': '查询成功', 'data': [{'aaa': '111', 'bbb': '222', 'ccc': '333', 'ddd': '444', 'eee': '555', 'fff': '666', 'ggg': '777', 'hhh': None}]}
jres = json.loads(a.text)
jres['retCode'] 可以获取到 0000000.
问一下如何获取到 data 下面 bbb 的值?
3 条回复 • 2017-11-26 15:34:59 +08:00
|
|
1
kyokuheishin 2017-11-26 14:39:58 +08:00 1
把 json 转成字典然后多套几个[]取就是了
|
|
|
2
est 2017-11-26 14:42:23 +08:00 2
jres['data'][0]['bbb']
|