#json_d.py
import json
element = '''
[
    {
        "name":  "Franz",
        "alter":  27,
        "hobby": "Python",
        "kinder": 0
    },
    {
        "name":  "Karin",
        "alter":  25,
        "hobby": ["Python","Java","C++"],
        "kinder": 0
    },
    {
        "name":  "Beate",
        "alter":  37,
        "hobby": "Node-Red",
        "kinder":
                [
                    {
                        "name":  "Paul",
                        "alter":  7
                    },
                    {
                        "name":  "Kira",
                        "alter":  4
                    }
                ]              
    }
]
'''
json_str = json.loads(element)
#print(json_str)
print(json_str[2]['kinder'][1]['alter'])

with open('text_json_4.json','w') as datei:
    datei.write(json.dumps(json_str, indent=4))
    
    