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

[![enter image description here](https://i.stack.imgur.com/JLGIy.png)](https://i.stack.imgur.com/JLGIy.png)

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...

```html
$.ajax({
            type: 'GET',
            url: "http://api.openweathermap.org/data/2.5/forecast?q=Redlands,us&mode=json&units=imperial&cnt=20&APPID=5eea63b2ee3505c58713d9149832d4c5",
            dataType: 'json',
            success: function(data){
                //console.log(data.list[0].main.temp);
                //trying to parse through data for graph
                var date = [];
                $.each(data,function(index, data){
                    date.append(data.list[index].main.temp);
                });

            }

        });
```

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?