嗨,我在 python 中有以下代码:
import json
jsonpost = json.loads('{"Player": {"_id": "3","firstName":"kim","surname":"jones"},"newTable": {"_id": "4","SurName": "abcd"}}')
for key in jsonpost.keys():
for innerkey in jsonpost[key]:
print innerkey
我的问题是为什么当我打印出内部键时 jsonpost['Player'] 的键顺序如下:
_id , surname, firstName