Fixing a regex and removing the weird json functions to force and array in response.