def multi_level_get(the_dict, key, default=None):
    """
    Given the level of nested data contained in some of the results, this function
    performs an iterative get.

    :param the_dict: The multi-level dict to get the key from.
    :param key: The key to look for, with each level separated by '.'
    :param default: The default to return if the key is not found. (None if not supplied)
    :returns: The value of the key or default if key does not exist in the dict.
    """
    if not isinstance(the_dict, dict):
        return default
    lvls = key.split('.')
    here = the_dict
    for lvl in lvls[:-1]:
        if lvl in here:
            here = here[lvl]
        else:
            return default
        if not isinstance(here, dict):
            return default

    return here.get(lvls[-1], default)