reads a dictionary and returns a list of fields cojoined with a dot
    notation

    args:
        obj: the dictionary to parse
        parent: name for a parent key. used with a recursive call

def dict_fields(obj, parent=[]):
    """
    reads a dictionary and returns a list of fields cojoined with a dot
    notation

    args:
        obj: the dictionary to parse
        parent: name for a parent key. used with a recursive call
    """
    rtn_obj = {}
    for key, value in obj.items():
        new_key = parent + [key]
        new_key = ".".join(new_key)
        if isinstance(value, list):
            if value:
                value = value[0]
        if isinstance(value, dict):
            rtn_obj.update(dict_fields(value, [new_key]))
        else:
            rtn_obj.update({new_key: value})
    return rtn_obj