Hi all,
I don't get why what I implement doesn't work.
Any idea?
I would like to retreive "lat" and "lon" from this Json.
This is what the JSON looks like :
{ "associated":{"utcOffset":2, "units":{"temperature":"C","tideHeight":"M","swellHeight":"M","waveHeight":"M","windSpeed":"KPH"}, "tideLocation":{"name":"Les Sables d'Olonne","min":-0.16,"max":6.09,"lon":-1.7833,"lat":46.5,"mean":0} }, ... }
And that's what I implemented :
// INIT LAT AND LON var associated = data["associated"]; var tideLocation = associated["tideLocation"]; var Lat = tideLocation["lat"]; var Lon = tideLocation["lon"];
Where "data" is the JSON pushed as a parameter of the onReceive function.
Any advice?