Recursively lookup an item in a nested dictionary,
    using an array of indexes

    >>> _dig_get({"a":{"b":{"c":1}}}, 2, "a", "b", "d")
    2

def _dig_get(obj, default, *key):
    """
    Recursively lookup an item in a nested dictionary,
    using an array of indexes

    >>> _dig_get({"a":{"b":{"c":1}}}, 2, "a", "b", "d")
    2
    """
    key = _splice_index(*key)

    if len(key) == 1:
        if isinstance(key[0], str):
            return obj.get(key[0], default)
        else:
            try:
                return obj[key[0]]
            except IndexError:
                return default

    return _dig_get(obj[key[0]], default, *key[1:])