def clean_response(input_str):
    """Clean a response to make it valid JSON (i.e. remove 'jQuery' wrapper).

    Args:
        input_str (str): A raw string response from the Edinburgh Fringe SOLR search API.

    Returns:
        str: A string which should be valid JSON.
    """
    pos_json_start = input_str.find('(') + 1
    pos_json_end = input_str.rfind(')')
    return input_str[pos_json_start:pos_json_end]