我想访问的Python JSON对象,我通过不同的错误如何在python
这个运行访问JSON是数据
value = '{"0":{"created":"05-16-13","counter":3},"1":{"created":"05-17-13","counter":1},"2":{"created":"05-18-13","counter":1}}'
I will like to get
"05-16-13","counter":3
"05-18-13","counter":1
I did
for info in value:
print info['counter']
I keep getting a type error, any help?
TypeError: string indices must be integers, not str
哪里是错误? –
TypeError:字符串索引必须是整数,而不是str –