def flatten_record(records):
    """
    Flatten record objects by rdata field to support line delimited (CSV) output

    :param records: list
    :return: list
    """

    flattened_records = []

    for record in records:
        for rdata in record["rdata"]:
            r = record
            r["rdata"] = rdata
            flattened_records.append(r)

    return flattened_records