I would like my code to get JSON and read the temperature value for London.

Any help would be very appreciated.

However I have two issues, the data fetched shows this: [object Object]

1. How to repair it?
2. How to make it fetch the temperature value for London, which is in main and temp.

Maybe like this:

```
data.["main"].temp

```

It's a Kelvin temperature for London, 277.21.

My JSON:

```
{
    "coord": { "lon": -0.1257, "lat": 51.5085 },
    "weather": [{ "id": 800, "main": "Clear", "description": "clear sky", "icon": "01n" }],
    "base": "stations",
    "main": { "temp": 277.21, "feels_like": 275.36, "temp_min": 274.4, "temp_max": 279.13, "pressure": 1042, "humidity": 93 },
    "visibility": 9000,
    "wind": { "speed": 2.06, "deg": 230 },
    "clouds": { "all": 9 },
    "dt": 1642014889,
    "sys": { "type": 2, "id": 2019646, "country": "GB", "sunrise": 1641974505, "sunset": 1642004119 },
    "timezone": 0,
    "id": 2643743,
    "name": "London",
    "cod": 200
}

```

My bad code:

```
 $.ajax({
            url: "https://api.openweathermap.org/data/2.5/weather?q=London&appid=a7a01852c805157a4c8334e87e39c75c",
            cache: false,
            dataType: "json",
            complete: function(data) {

                tempLondon = data;

                 $('#tempLondon').append('The temperature is ' + tempLondon );
                 console.log(tempLondon);
            }
        });

```