im trying to print a json in python
"rules":[
        {
            "table":"Forest",
            "format":"List",
            "header":{"en":"Forest","fr":"Forêt"},
            "fields":[
                {
                    "name":"Name",
                    "displayName":{"en":"Forest","fr":"Forêt"}
                },
                {
                    "name":"ForestMode",
                    "displayName":{"en":"Forest Mode","fr":"Mode forêt"},
                    "ok":"re.search('Windows(2019|2016)Forest',x) != None",
                    "warn":"re.search('Windows(2012R2|2012)Forest',x) != None",
                    "nok":"re.search('Windows(2008R2|2008|2003|2003Interim|2000)Forest',x) != None",
                    "comment":{"en":"Increase the functional level of the forest","fr":"Augmenter le niveau fonctionnel de la forêt"}
                },
                {
                    "name":"RootDomain",
                    "displayName":{"en":"Root Domain","fr":"Domaine racine"}
                },
                {
                    "name":"Domains",
                    "displayName":{"en":"Domains","fr":"Domaines"}
                },
                {
                    "name":"Sites",
                    "displayName":{"en":"Sites","fr":"Sites"}
                },
                {but i've run into an issue some of the json data doent have the key while some do i have written this thus far
with open('./rules-adds.json', 'r') as ad_file:
    ad_data = json.load(ad_file)
    #    print(ad_data)
    data = ad_data["rules"]
#    print(data)
#    print(json.dumps(ad_data, indent=4))
for x in data:
    print(x['table'], x['fields'])
    for y in x['fields']:
        print(y['name'])But i get an error since the first element of the json file doesn't have the "ok" key
    print(y['ok'])
KeyError: 'ok' 
     
    