def get_from_key(item, key, reduced_key=None, delimiter='.'):
    """
    nice little tool to aid in flexibility when dealing with multilayer dicts.
    """
    if type(item) is not dict:
        return item
    try:
        return item[key]
    except KeyError:
        if reduced_key is None:
            reduced_key = key.split(delimiter)[0]
        return item[reduced_key]
