CodePanda CodePanda - 1 year ago 100
jQuery Question

Trying to store json data into an javascript array

I have the following json data that looks like this...

enter image description here

What I am trying to do is store the temp numbers into a javascript array to display on a graph. This is my code that I was working on...

type: 'GET',
url: ",us&mode=json&units=imperial&cnt=20&APPID=5eea63b2ee3505c58713d9149832d4c5",
dataType: 'json',
success: function(data){
//trying to parse through data for graph
var date = [];
$.each(data,function(index, data){



But it is not working I get the following error...
Uncaught TypeError: Cannot read property 'city' of undefined

Anyone know how I can fix this?

Answer Source

i see working , same from Erik Engervall, i change var data for current

    $.each(data.list,function(index, current){
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download