abc = {
"orders": [
{
"orderID": 5,
"cost": 10,
"sell": 15
},
{
"orderID": 6,
"cost": 8,
"sell": 12
},
{
"orderID": 7,
"cost": 15,
"sell": 26
}
]
}
for key, value in abc.items():
print (value["orderID"])
我想提取orderID值,但似乎無法使這項工作。它應迴應 5,6,7迭代通過json對象/字典
開始打印'value',看看它返回什麼... – njzk2