I’m not a coder need help with syntax, almost got it I think
-
I am having trouble understanding what the syntax is to read deeper into the json data.
This is the api for a weather station. I want to be able to get the name, station ID, air_temp, Precip, wind direction, and some other stuff.For now I limited the api to the air temp just to make it simpler for me to read. I feel confident that if I can get air temp to work, then I can figure out the others.
I was able to get the Station name and ID to print with this:
{subloop-array:STATION:-1}
{subloop:station.name:-1}
{STATION.NAME} {STATION.STID}
{/subloop:STATION.name}
{/subloop-array:STATION}I am having trouble getting air temp which is nested under OBSERVATIONS.
What I want to get on the screen is the air_temp_value_1 value.
I’ve tried tweaking this so many times, that I am just lost now.{subloop-array:STATION:-1} {STATION.OBSERVATIONS} Current Temperature: {subloop:STATION.air_temp_value_1:-1}{value}
{/subloop:STATION.air_temp_value_1:-1}
{/subloop-array:STATION:-1}Can you point me in the right direction?
The page I need help with: [log in to see the link]
- The topic ‘I’m not a coder need help with syntax, almost got it I think’ is closed to new replies.