現在有一個json數據,如下:
{
"favourite":{
"bkmrk":{
"id1490843709594066":{
"guid":"904eff52277f403b89f6410fe2758646.11",
"lcate":"1"
},
"id1490843712805183":{
"guid":"58457f60eca64025bc43a978f9c98345.16",
"lcate":"2"
},
"id149084371467327":{
"guid":"a0f907f9dc8b40f689b083f3eba7228b.16",
"lcate":"3"
},
"id1490843716295393":{
"guid":"eb75d929455e468bb712e7bc2025d11a.16",
"lcate":"4"
}
}
}
}
我該如何使用python操作該json,才能得到以下形式的內容:
"guid":"904eff52277f403b89f6410fe2758646.11"
"guid":"58457f60eca64645. "
"guid":"a0f907f9dc8b40f689b083f3eba7228b.16"
"guid":"eb75d929455e468bb712e7bc2025d11a.16"
怪我咯2017-05-18 10:55:08
import json
with open('json.txt', 'r') as fp:
data = json.load(fp)
print(data)
data
就是你要的。