def cleanup_community(community):
    """Given a dictionary of a community, return a new dictionary for output as
    JSON."""
    
    comm_data = community
    comm_data["id"] = str(community["_id"])
    comm_data["user"] = str(community["user"])
    del comm_data["_id"]
    
    return comm_data