【发布时间】:2019-01-18 04:33:33
【问题描述】:
我在 JSON 中有以下嵌套字典。如果我想得到“id”、“self”、“name”,我应该如何使用 Python 程序来解析它。
{
"items": [
{
"id": "12345",
"links": {
"self": "https://www.google.com"
},
"name": "beast",
"type": "Device"
}
],
"links": {
"self": "https://www.google.com"
},
"paging": {
"count": 1,
"limit": 1,
"offset": 0,
"pages": 1
}
}
【问题讨论】:
-
哪个自己?两个?
-
@Onyambu 是的。对他们俩来说。
-
不完全相同的问题,但应该指出你正确的方向Parsing values from a JSON file
标签: python json python-3.x dictionary data-structures