def deep_get()

in bulkExport/glueScripts/export-script.py [0:0]


def deep_get(resource, path):
    temp = [resource]
    for p in path:
        new_temp = []
        for item in temp:
            if item is None or p not in item:
                continue
            if isinstance(item[p], list):
                new_temp.extend(item[p])
            else:
                new_temp.append(item[p])
        temp = new_temp
    return temp