AnsweredAssumed Answered

Parsing Google maps API

Question asked by walfwood on Dec 7, 2018
Latest reply on Dec 7, 2018 by walfwood

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.

With, w

JSONGetElement ( $distance ; "results[0].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.