This is my sample code:
st = loadedJSON
if len(value) == 1:
x = st[value[0]]['sample']
elif len(value) == 2:
x = st[value[0]][value[1]]['sample']
elif len(value) == 3:
x = st[value[0]][value[1]][value[2]]['sample']
I'm not sure how to convert this code into something like:
value = ["1","2","3","4","5","6"]
st = loadedJSON
y = len(value)
# Need to create like this
x = st["1"]["2"]["3"]["4"]["5"]["6"]['sample']
# Bigger VALUE = Bigger JSON Keys Path
Is it any specific function that converts ARRAY to JSON Key Path?