Suppose our JSON file has data:

```
[{
"key1": "value",
"key2": [{
        "key1": "value",
        "key2": [{
                "key1": "value",
                "key2": "value"
            }]              
    },
    {
        "key1": "value",
        "key2": "value"
    }]
}]

```

In this case, I can access the child using:

```
with open (filename) as f:
     data = json.load(f)

data[0]['key2'][0]['key2']

```

But how can I access child element if I dont know how many times it is nested? Is there a way to generate pattern like `data[0]['key2'][0]['key2'][0]['key2'][0]['key2']` or a better way of accessing child.

PS: After accessing child element I would need to modify it and then save it in the same source file.