remove newlines before parsing the filter from the JSON