I am trying to get a 3 day forecast from the Weather Underground API using this:
var Forcast = parsed_json['forecast']['txt_forecast']['period'][0]['fcttext_metric'];
Its not working and i have no experience with json so i don’t have a clue what i need to do in-order for this to work. Bellow is the part of the json file i want:
"forecast": {
"txt_forecast": {
"date": "2:00 PM PDT",
"forecastday": [{
"period": 0,
"icon": "partlycloudy",
"icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
"title": "Tuesday",
"fcttext": "Partly cloudy in the morning, then clear. High of 68F. Breezy. Winds from the West at 10 to 25 mph.",
"fcttext_metric": "Partly cloudy in the morning, then clear. High of 20C. Windy. Winds from the West at 20 to 35 km/h.",
"pop": "0"
}, {
Could Someone please show me how to get the information i need.
I have managed to work it out with some help from one of the users on the official Wunderground forum. Here is the new code that i am using with a few more added bits.