Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

access nested set with array params python


from functools import reduce  # forward compatibility for Python 3
import operator

def getFromDict(dataDict, mapList):
    return reduce(operator.getitem, mapList, dataDict)

Source by coders911.org #
 
PREVIOUS NEXT
Tagged: #access #nested #set #array #params #python
ADD COMMENT
Topic
Name
1+4 =