我在python中使用azurecosmosdb,无法按我想要的方式打印数据
我的容器:
{
"id": "first",
"lexicon": {
"Eqt": "UNKN",
"PN": "abvcfgg",
},
"location": {
"Region": "China",
"Country": "China"
}
}
Python代码:
for item in list(results):
print(results)
输出为:
{'id': 'test', 'lexicon': {'Eqt': 'UNKN', 'PN': 'abvcfgg'}, "location": { "Region": "China",
"Country": "China"}
我想要的输出方式是:
id: test
Lexicon:
Eqt: UNKN
PN: abvcfgg
location
Region: China
Country: China
像这样,但只对dict嵌套一次
相关问题 更多 >
编程相关推荐