def cleanup_comment(comment):
    """Given a dictionary of a comment record, return a new dictionary for 
    output as JSON."""

    comm_data = comment
    comm_data["id"] = str(comm_data["_id"])
    comm_data["user"] = str(comm_data["user"])
    comm_data["post"] = str(comm_data["post"])
    comm_data["created"] = str(comm_data["created"].ctime())
    del comm_data["_id"]

    return comm_data