Forecast Javascript Results

  • 1
  • Question
  • Updated 5 years ago
I am trying to determine what is the top level, for the forecast feature. Can't seem to get that to display in a view.

These all get the results:
' Conditions Now: {current_observation.weather}
',
' Temperature: {current_observation.temp_f} F
',
' Feels Like: {current_observation.feelslike_f} F
',
' Humidity: {current_observation.relative_humidity} %
',
' Wind: {current_observation.wind_string}

',

This doesn't:
' Forecast: {forecast.simpleforecast.forecastday.period[1].conditions}

',

The results are returned in my combined, forecast, geolookup, conditions .json url.
http://api.wunderground.com/api/YOUR_...

I just can't get the forecast tree figured out.
Thanks for any suggestions.







Photo of Zulu1950

Zulu1950

  • 2 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of afelicioni

afelicioni

  • 227 Posts
  • 43 Reply Likes
I'm not sure I got the wanted syntax, anyway give a try forforecast.simpleforecast.forecastday[0].conditions
Photo of Zulu1950

Zulu1950

  • 2 Posts
  • 0 Reply Likes
Thanks for the reply. As I am using javascript it took some syntax formatting to get the desired results.

For those who have or may run into this:
' Forecast: {[values.forecast.txt_forecast.forecastday[0].fcttext]}

',

Thanks,