Hello, I am new to APIs so I don't fully understand why I am getting an error when I parse the json response.
I am trying to get the latitude and longitude from customer's address in the DB and through Google maps API. https://maps.googleapis.com/maps/api/geocode/json?address=&key=.
JSONGetElement ( $distance ; "results.geometry.location" )
I get it to show me this
"lat" : 44.9666924,
"lng" : 74.6385548
but I can not parse just the lat or lng.
If I try to parse it, I get this error.
? * Line 1, Column 1
A valid JSON document must be either an array or an object value.
Any help would be appreciated.