In [1]:
forecast = {
	"operationalMode":"Production",
	"srsName":"WGS 1984",
	"creationDate":"2015-12-28T10:00:55-05:00",
	"creationDateLocal":"28 Dec 11:54 am EDT",
	"productionCenter":"Gray/Portland, ME",
	"credit":"http://www.erh.noaa.gov/gyx/",
	"moreInformation":"http://weather.gov",
	"location":{
		"region":"erh",
		"latitude":"44.09",
		"longitude":"-70.7",
		"elevation":"394",
		"wfo":"GYX",
		"timezone":"E|Y|5",
		"areaDescription":"North Bridgton ME",
		"radar":"KGYX",
		"zone":"MEZ019",
		"county":"MEC005",
		"firezone":"MEZ019",
		"metar":"KIZG"
},
	"time":{
		"layoutKey":"k-p12h-n13-1",
		"startPeriodName":[
			"This Afternoon",
			"Tonight",
			"Tuesday",
			"Tuesday Night",
			"Wednesday",
			"Wednesday Night",
			"Thursday",
			"Thursday Night",
			"New:Year's Day",
			"Friday Night",
			"Saturday",
			"Saturday Night",
			"Sunday"
		],
		"startValidTime":[
			"2015-12-28T12:00:00-05:00",
			"2015-12-28T18:00:00-05:00",
			"2015-12-29T06:00:00-05:00",
			"2015-12-29T18:00:00-05:00",
			"2015-12-30T06:00:00-05:00",
			"2015-12-30T18:00:00-05:00",
			"2015-12-31T06:00:00-05:00",
			"2015-12-31T18:00:00-05:00",
			"2016-01-01T06:00:00-05:00",
			"2016-01-01T18:00:00-05:00",
			"2016-01-02T06:00:00-05:00",
			"2016-01-02T18:00:00-05:00",
			"2016-01-03T06:00:00-05:00"
		],
		"tempLabel":["High","Low","High","Low","High","Low","High","Low","High","Low","High","Low","High"]
	},
	"data":{
		"temperature":["25","16","27","19","36","25","39","23","35","20","30","8","22"],
		"pop":[null,"60","100",null,"40","50",null,null,null,null,null,null,null],

		"weather":[
			"Mostly Sunny",
			"Mostly Cloudy then Snow Likely",
			"Wintry Mix",
			"Freezing Drizzle then Freezing Drizzle Likely",
			"Chance Snow Showers then Chance Rain/Snow",
			"Chance Snow/Sleet then Chance Sleet",
			"Partly Sunny",
			"Mostly Cloudy",
			"Partly Sunny",
			"Partly Cloudy",
			"Mostly Sunny",
			"Partly Cloudy",
			"Partly Sunny"
			],
		"iconLink":[
			"http://forecast.weather.gov/newimages/medium/sct.png",
            "http://forecast.weather.gov/DualImage.php?i=nbkn&j=nsn&jp=60",
			"http://forecast.weather.gov/newimages/medium/fzra_sn100.png",
            "http://forecast.weather.gov/DualImage.php?i=nfzra&j=nfzra&ip=90&jp=60",
            "http://forecast.weather.gov/DualImage.php?i=sn&j=ra_sn&ip=30&jp=40",
            "http://forecast.weather.gov/DualImage.php?i=nsn_ip&j=nip&ip=50&jp=50",
			"http://forecast.weather.gov/newimages/medium/bkn.png",
			"http://forecast.weather.gov/newimages/medium/nbkn.png",
			"http://forecast.weather.gov/newimages/medium/bkn.png",
			"http://forecast.weather.gov/newimages/medium/nsct.png",
			"http://forecast.weather.gov/newimages/medium/sct.png",
			"http://forecast.weather.gov/newimages/medium/nsct.png",
			"http://forecast.weather.gov/newimages/medium/bkn.png"
			],
		"hazard":[
			"Winter Storm Watch",			"Hazardous Weather Outlook"
			],
		"hazardUrl":[
			"http://forecast.weather.gov/showsigwx.php?warnzone=MEZ019&warncounty=MEC005&firewxzone=MEZ019&local_place1=North+Bridgton+ME&product1=Winter+Storm+Watch",			"http://forecast.weather.gov/showsigwx.php?warnzone=MEZ019&warncounty=MEC005&firewxzone=MEZ019&local_place1=North+Bridgton+ME&product1=Hazardous+Weather+Outlook"
			],
		"text":[
			"Mostly sunny, with a high near 25. North wind 10 to 15 mph. ",
			"Snow likely, mainly after 4am.  Increasing clouds, with a low around 16. North wind around 5 mph.  Chance of precipitation is 60%. New snow accumulation of less than one inch possible. ",
			"Snow and sleet before 1pm, then snow and freezing rain between 1pm and 2pm, then snow after 2pm.  High near 27. Northeast wind around 5 mph.  Chance of precipitation is 100%. Little or no ice accumulation expected.  New snow and sleet accumulation of 4 to 8 inches possible. ",
			"Freezing drizzle, mainly before 4am.  Cloudy, with a low around 19. Northeast wind around 5 mph. ",
			"A chance of rain and snow showers before 2pm, then a chance of rain showers between 2pm and 4pm, then a chance of rain and snow showers after 4pm.  Partly sunny, with a high near 36. Northeast wind around 5 mph becoming calm.  Chance of precipitation is 40%.",
			"A chance of snow before 11pm, then a chance of sleet.  Mostly cloudy, with a low around 25. Chance of precipitation is 50%.",
			"Partly sunny, with a high near 39.",
			"Mostly cloudy, with a low around 23.",
			"Partly sunny, with a high near 35.",
			"Partly cloudy, with a low around 20.",
			"Mostly sunny, with a high near 30.",
			"Partly cloudy, with a low around 8.",
			"Partly sunny, with a high near 22."			]
		},
		"currentobservation":{
			"id":"KIZG",
			"name":"Fryeburg, Eastern Slopes Regional Airport",
			"elev":"449",
			"latitude":"43.99",
			"longitude":"-70.95",
			"Date":"28 Dec 11:54 am EDT",
			"Temp":"24",
			"Dewp":"1",
			"Relh":"36",
			"Winds":"12",
			"Windd":"360",
			"Gust":"0",
			"Weather":"Fair",
			"Weatherimage":"sct.png",
			"Visibility":"10.00",
			"Altimeter":"1033.8",
			"SLP":"30.51",
			"timezone":"EST",
			"state":"ME",
			"WindChill":"13"
		}
	}


Out[1]:
{ operationalMode: 'Production',
  srsName: 'WGS 1984',
  creationDate: '2015-12-28T10:00:55-05:00',
  creationDateLocal: '28 Dec 11:54 am EDT',
  productionCenter: 'Gray/Portland, ME',
  credit: 'http://www.erh.noaa.gov/gyx/',
  moreInformation: 'http://weather.gov',
  location: 
   { region: 'erh',
     latitude: '44.09',
     longitude: '-70.7',
     elevation: '394',
     wfo: 'GYX',
     timezone: 'E|Y|5',
     areaDescription: 'North Bridgton ME',
     radar: 'KGYX',
     zone: 'MEZ019',
     county: 'MEC005',
     firezone: 'MEZ019',
     metar: 'KIZG' },
  time: 
   { layoutKey: 'k-p12h-n13-1',
     startPeriodName: 
      [ 'This Afternoon',
        'Tonight',
        'Tuesday',
        'Tuesday Night',
        'Wednesday',
        'Wednesday Night',
        'Thursday',
        'Thursday Night',
        'New:Year\'s Day',
        'Friday Night',
        'Saturday',
        'Saturday Night',
        'Sunday' ],
     startValidTime: 
      [ '2015-12-28T12:00:00-05:00',
        '2015-12-28T18:00:00-05:00',
        '2015-12-29T06:00:00-05:00',
        '2015-12-29T18:00:00-05:00',
        '2015-12-30T06:00:00-05:00',
        '2015-12-30T18:00:00-05:00',
        '2015-12-31T06:00:00-05:00',
        '2015-12-31T18:00:00-05:00',
        '2016-01-01T06:00:00-05:00',
        '2016-01-01T18:00:00-05:00',
        '2016-01-02T06:00:00-05:00',
        '2016-01-02T18:00:00-05:00',
        '2016-01-03T06:00:00-05:00' ],
     tempLabel: 
      [ 'High',
        'Low',
        'High',
        'Low',
        'High',
        'Low',
        'High',
        'Low',
        'High',
        'Low',
        'High',
        'Low',
        'High' ] },
  data: 
   { temperature: 
      [ '25',
        '16',
        '27',
        '19',
        '36',
        '25',
        '39',
        '23',
        '35',
        '20',
        '30',
        '8',
        '22' ],
     pop: 
      [ null,
        '60',
        '100',
        null,
        '40',
        '50',
        null,
        null,
        null,
        null,
        null,
        null,
        null ],
     weather: 
      [ 'Mostly Sunny',
        'Mostly Cloudy then Snow Likely',
        'Wintry Mix',
        'Freezing Drizzle then Freezing Drizzle Likely',
        'Chance Snow Showers then Chance Rain/Snow',
        'Chance Snow/Sleet then Chance Sleet',
        'Partly Sunny',
        'Mostly Cloudy',
        'Partly Sunny',
        'Partly Cloudy',
        'Mostly Sunny',
        'Partly Cloudy',
        'Partly Sunny' ],
     iconLink: 
      [ 'http://forecast.weather.gov/newimages/medium/sct.png',
        'http://forecast.weather.gov/DualImage.php?i=nbkn&j=nsn&jp=60',
        'http://forecast.weather.gov/newimages/medium/fzra_sn100.png',
        'http://forecast.weather.gov/DualImage.php?i=nfzra&j=nfzra&ip=90&jp=60',
        'http://forecast.weather.gov/DualImage.php?i=sn&j=ra_sn&ip=30&jp=40',
        'http://forecast.weather.gov/DualImage.php?i=nsn_ip&j=nip&ip=50&jp=50',
        'http://forecast.weather.gov/newimages/medium/bkn.png',
        'http://forecast.weather.gov/newimages/medium/nbkn.png',
        'http://forecast.weather.gov/newimages/medium/bkn.png',
        'http://forecast.weather.gov/newimages/medium/nsct.png',
        'http://forecast.weather.gov/newimages/medium/sct.png',
        'http://forecast.weather.gov/newimages/medium/nsct.png',
        'http://forecast.weather.gov/newimages/medium/bkn.png' ],
     hazard: [ 'Winter Storm Watch', 'Hazardous Weather Outlook' ],
     hazardUrl: 
      [ 'http://forecast.weather.gov/showsigwx.php?warnzone=MEZ019&warncounty=MEC005&firewxzone=MEZ019&local_place1=North+Bridgton+ME&product1=Winter+Storm+Watch',
        'http://forecast.weather.gov/showsigwx.php?warnzone=MEZ019&warncounty=MEC005&firewxzone=MEZ019&local_place1=North+Bridgton+ME&product1=Hazardous+Weather+Outlook' ],
     text: 
      [ 'Mostly sunny, with a high near 25. North wind 10 to 15 mph. ',
        'Snow likely, mainly after 4am.  Increasing clouds, with a low around 16. North wind around 5 mph.  Chance of precipitation is 60%. New snow accumulation of less than one inch possible. ',
        'Snow and sleet before 1pm, then snow and freezing rain between 1pm and 2pm, then snow after 2pm.  High near 27. Northeast wind around 5 mph.  Chance of precipitation is 100%. Little or no ice accumulation expected.  New snow and sleet accumulation of 4 to 8 inches possible. ',
        'Freezing drizzle, mainly before 4am.  Cloudy, with a low around 19. Northeast wind around 5 mph. ',
        'A chance of rain and snow showers before 2pm, then a chance of rain showers between 2pm and 4pm, then a chance of rain and snow showers after 4pm.  Partly sunny, with a high near 36. Northeast wind around 5 mph becoming calm.  Chance of precipitation is 40%.',
        'A chance of snow before 11pm, then a chance of sleet.  Mostly cloudy, with a low around 25. Chance of precipitation is 50%.',
        'Partly sunny, with a high near 39.',
        'Mostly cloudy, with a low around 23.',
        'Partly sunny, with a high near 35.',
        'Partly cloudy, with a low around 20.',
        'Mostly sunny, with a high near 30.',
        'Partly cloudy, with a low around 8.',
        'Partly sunny, with a high near 22.' ] },
  currentobservation: 
   { id: 'KIZG',
     name: 'Fryeburg, Eastern Slopes Regional Airport',
     elev: '449',
     latitude: '43.99',
     longitude: '-70.95',
     Date: '28 Dec 11:54 am EDT',
     Temp: '24',
     Dewp: '1',
     Relh: '36',
     Winds: '12',
     Windd: '360',
     Gust: '0',
     Weather: 'Fair',
     Weatherimage: 'sct.png',
     Visibility: '10.00',
     Altimeter: '1033.8',
     SLP: '30.51',
     timezone: 'EST',
     state: 'ME',
     WindChill: '13' } }

In [7]:
for (var i in forecast.data.temperature) {
    console.log(i)
}


0
1
2
3
4
5
6
7
8
9
10
11
12
Out[7]:
undefined

In [8]:
for (var key in forecast.data) {
    console.log(key)
}


temperature
pop
weather
iconLink
hazard
hazardUrl
text
Out[8]:
undefined

In [11]:
var forecastToArray = function(forecast) {
    var output = [];
    for (var i in forecast.data.temperature) {
        var period = {};
        for (var key in forecast.data) {
            period[key] = forecast.data[key][i];
        }
        for (var key in forecast.time) {
            period[key] = forecast.time[key][i];
        }
        output.push(period);
    }
    return output;
}

forecastToArray(forecast);


Out[11]:
[ { temperature: '25',
    pop: null,
    weather: 'Mostly Sunny',
    iconLink: 'http://forecast.weather.gov/newimages/medium/sct.png',
    hazard: 'Winter Storm Watch',
    hazardUrl: 'http://forecast.weather.gov/showsigwx.php?warnzone=MEZ019&warncounty=MEC005&firewxzone=MEZ019&local_place1=North+Bridgton+ME&product1=Winter+Storm+Watch',
    text: 'Mostly sunny, with a high near 25. North wind 10 to 15 mph. ',
    layoutKey: 'k',
    startPeriodName: 'This Afternoon',
    startValidTime: '2015-12-28T12:00:00-05:00',
    tempLabel: 'High' },
  { temperature: '16',
    pop: '60',
    weather: 'Mostly Cloudy then Snow Likely',
    iconLink: 'http://forecast.weather.gov/DualImage.php?i=nbkn&j=nsn&jp=60',
    hazard: 'Hazardous Weather Outlook',
    hazardUrl: 'http://forecast.weather.gov/showsigwx.php?warnzone=MEZ019&warncounty=MEC005&firewxzone=MEZ019&local_place1=North+Bridgton+ME&product1=Hazardous+Weather+Outlook',
    text: 'Snow likely, mainly after 4am.  Increasing clouds, with a low around 16. North wind around 5 mph.  Chance of precipitation is 60%. New snow accumulation of less than one inch possible. ',
    layoutKey: '-',
    startPeriodName: 'Tonight',
    startValidTime: '2015-12-28T18:00:00-05:00',
    tempLabel: 'Low' },
  { temperature: '27',
    pop: '100',
    weather: 'Wintry Mix',
    iconLink: 'http://forecast.weather.gov/newimages/medium/fzra_sn100.png',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Snow and sleet before 1pm, then snow and freezing rain between 1pm and 2pm, then snow after 2pm.  High near 27. Northeast wind around 5 mph.  Chance of precipitation is 100%. Little or no ice accumulation expected.  New snow and sleet accumulation of 4 to 8 inches possible. ',
    layoutKey: 'p',
    startPeriodName: 'Tuesday',
    startValidTime: '2015-12-29T06:00:00-05:00',
    tempLabel: 'High' },
  { temperature: '19',
    pop: null,
    weather: 'Freezing Drizzle then Freezing Drizzle Likely',
    iconLink: 'http://forecast.weather.gov/DualImage.php?i=nfzra&j=nfzra&ip=90&jp=60',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Freezing drizzle, mainly before 4am.  Cloudy, with a low around 19. Northeast wind around 5 mph. ',
    layoutKey: '1',
    startPeriodName: 'Tuesday Night',
    startValidTime: '2015-12-29T18:00:00-05:00',
    tempLabel: 'Low' },
  { temperature: '36',
    pop: '40',
    weather: 'Chance Snow Showers then Chance Rain/Snow',
    iconLink: 'http://forecast.weather.gov/DualImage.php?i=sn&j=ra_sn&ip=30&jp=40',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'A chance of rain and snow showers before 2pm, then a chance of rain showers between 2pm and 4pm, then a chance of rain and snow showers after 4pm.  Partly sunny, with a high near 36. Northeast wind around 5 mph becoming calm.  Chance of precipitation is 40%.',
    layoutKey: '2',
    startPeriodName: 'Wednesday',
    startValidTime: '2015-12-30T06:00:00-05:00',
    tempLabel: 'High' },
  { temperature: '25',
    pop: '50',
    weather: 'Chance Snow/Sleet then Chance Sleet',
    iconLink: 'http://forecast.weather.gov/DualImage.php?i=nsn_ip&j=nip&ip=50&jp=50',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'A chance of snow before 11pm, then a chance of sleet.  Mostly cloudy, with a low around 25. Chance of precipitation is 50%.',
    layoutKey: 'h',
    startPeriodName: 'Wednesday Night',
    startValidTime: '2015-12-30T18:00:00-05:00',
    tempLabel: 'Low' },
  { temperature: '39',
    pop: null,
    weather: 'Partly Sunny',
    iconLink: 'http://forecast.weather.gov/newimages/medium/bkn.png',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Partly sunny, with a high near 39.',
    layoutKey: '-',
    startPeriodName: 'Thursday',
    startValidTime: '2015-12-31T06:00:00-05:00',
    tempLabel: 'High' },
  { temperature: '23',
    pop: null,
    weather: 'Mostly Cloudy',
    iconLink: 'http://forecast.weather.gov/newimages/medium/nbkn.png',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Mostly cloudy, with a low around 23.',
    layoutKey: 'n',
    startPeriodName: 'Thursday Night',
    startValidTime: '2015-12-31T18:00:00-05:00',
    tempLabel: 'Low' },
  { temperature: '35',
    pop: null,
    weather: 'Partly Sunny',
    iconLink: 'http://forecast.weather.gov/newimages/medium/bkn.png',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Partly sunny, with a high near 35.',
    layoutKey: '1',
    startPeriodName: 'New:Year\'s Day',
    startValidTime: '2016-01-01T06:00:00-05:00',
    tempLabel: 'High' },
  { temperature: '20',
    pop: null,
    weather: 'Partly Cloudy',
    iconLink: 'http://forecast.weather.gov/newimages/medium/nsct.png',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Partly cloudy, with a low around 20.',
    layoutKey: '3',
    startPeriodName: 'Friday Night',
    startValidTime: '2016-01-01T18:00:00-05:00',
    tempLabel: 'Low' },
  { temperature: '30',
    pop: null,
    weather: 'Mostly Sunny',
    iconLink: 'http://forecast.weather.gov/newimages/medium/sct.png',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Mostly sunny, with a high near 30.',
    layoutKey: '-',
    startPeriodName: 'Saturday',
    startValidTime: '2016-01-02T06:00:00-05:00',
    tempLabel: 'High' },
  { temperature: '8',
    pop: null,
    weather: 'Partly Cloudy',
    iconLink: 'http://forecast.weather.gov/newimages/medium/nsct.png',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Partly cloudy, with a low around 8.',
    layoutKey: '1',
    startPeriodName: 'Saturday Night',
    startValidTime: '2016-01-02T18:00:00-05:00',
    tempLabel: 'Low' },
  { temperature: '22',
    pop: null,
    weather: 'Partly Sunny',
    iconLink: 'http://forecast.weather.gov/newimages/medium/bkn.png',
    hazard: undefined,
    hazardUrl: undefined,
    text: 'Partly sunny, with a high near 22.',
    layoutKey: undefined,
    startPeriodName: 'Sunday',
    startValidTime: '2016-01-03T06:00:00-05:00',
    tempLabel: 'High' } ]

In [ ]: