Answers for "Extract specific field in json file python"

0

Extract specific field in json file python

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']
Posted by: Guest on July-08-2021

Code answers related to "Extract specific field in json file python"

Browse Popular Code Answers by Language