📜  提取json文件python中的特定字段-任何代码示例

📅  最后修改于: 2022-03-11 14:55:44.892000             🧑  作者: Mango

代码示例1
x = json.loads("""{
 "accountWide": true,
 "criteria": [
     {
         "description": "some description",
         "id": 7553,
         "max": 1,
         "orderIndex": 0
     }
  ]
 }""")
description = x['criteria'][0]['description']
id = x['criteria'][0]['id']
max = x['criteria'][0]['max']