import json


def get_logs_values(logs):
    """
    Extracts the logs from the Logz.io API response, and formats
    them for the output json.
    """
    logs_results = {"results": []}
    for log in logs:
        logs_results["results"].append(log["_source"])
    
    if len(logs_results) > 0:
        return json.dumps(logs_results)
    return None