Read the statement by Michael Teeuw here.
Get the correct JSON data
-
@htilburgs you can set a variable to the array locations and not move the data. of course the data element names may have changed , but that is an editor find/replace function
send the whole response up to the module
-
@sdetweil
As I told you I have to figure out how. I always have problems with understanding how JSON works. But no problem, it keeps me of the streets.
I haven’t been active for the last 3 years, but now I’ve found time and trying to complete / change some modules.
But thanks for you help. -
let foovar = payload.liveweer[0]
then you can use foovar to reference the data
json is just a text description of an object
it coverts directly into js with the same structure -
@sdetweil said in Get the correct JSON data:
coverts directly into js with the same structure
I will try tonight. I’m at work (yeh right ;-) right now.
-
@sdetweil said in Get the correct JSON data:
let foovar = payload.liveweer[0]
Is there a simple way to check what is in foovar?
-
@htilburgs console.log() same as before, BUT it is displayed in the developers window console table when its in the browser side module.js (modulename.js)
ctrl-shift-i, select the console tab
-
@sdetweil Thanks, that works!
Now I can really see what I’m doing.