The print statement on line 21 prints out the google api page There's no print statement on line 21 of my code, is it line 11?
And you mean the URL string by the google api page?
It would be far better copying all the outputs in the debug console than trying to describe them by words.
then nothing else is printed until line 51, "value for location not found or not string". It is strange and would never happen. If line 51 would be executed, line 30 print(String(data: data, encoding: .utf8) ?? "?") is definitely executed.
I did try change the array type to double but same output. Please show your code when talking about changing code. I really do not understand what you have tried.
When I switch, on line 46, the key value to "name" it is still able to store the values of name into the array and prints out properly. I do not understand what you mean. What is switch? What is able to store the values?
Please show actual code you used and actual output you saw.
I've been picking parts from different forums to try and make this app. Seems you have chosen a very bad one. If you find NS-something in a code, you should better avoid it.
(A little bit too simplified, but would be useful in many cases -- avoid NS-things.)