Accessing Deeper JSON Objects

Please could somebody help me with accessing nested JSON objects with the OpenWeather API? Anything in the city object I can access successfully, but I can’t seem to access anything else below it.

This is my code (currently using a click event while I work out the basics of this project):

$.getJSON("" , function(data) {

  // Replace Placeholders With JSON Objects
  $("#city").hide().html( + ", ").fadeIn('slow');




This is the JSON, I want to access the temperature much like I successfully accessed the city and country, but I can’t work out what to use.


Try this:



You can use something like JSON Lint to view a nicer JSON or use JSONView Chrome plugin.

Thank you! The JSON viewer I was using wasn’t showing the arrays very well. Working now.