I have a list with keys from an array/dictionary:
keys = ["key1", "key2", "key3"]
My dict looks like this
{"key1":
{
"key2":
{
"key3": "Value I want to receive"
}
}
}
I need a function that returns dict["key1"]["key2"]["key3]
or "False" if its not valid. For the latter I can use try, except
I think? I can't figure it out and I don't want to use eval()
.
Any ideas?