def follow_abspath(json, abspath):
    """json: an arbitrarily nested python object, where each layer
        is a list, dict, or tuple.
    abspath: a list of keys or array indices to be followed.
    **Returns:** the child of json[abspath[0]][abspath[1]]...[abspath[-1]]"""
    out = json
    for elt in abspath:
        out = out[elt]
    return out