Closed Joe-TheBro closed 2 months ago
The JSON response from geocode.city API returns an array since that's just how the autocomplete endpoint works. If we got rid of "limit=1" parameter from our url and requested "https://api.geocode.city/autocomplete?q=Pierre" then we get multiple objects
I moved around some functions and variables to keep scope limited. This code changes technically work, but I still can't wrap my brain around why
geocodeResponse
has to be[]geocodeResponse
, the JSON response should be a single object. Idk maybe I messed up checking types or something.