title: C# : extract/retrieve child node from JSON structure
body: <p>How can we extract or retrieve child nodes values from JSON structure in C#.</p>
  
  <p>my app is using <a href="http://api.openweathermap.org/data/2.5/forecast/daily?q=London,UK&amp;mode=json&amp;units=metric&amp;cnt=1" rel="noreferrer">OpenWeatherMap</a>, I need to retrieve <b>name</b> from <strong><em>city</em></strong>, <strong>temp</strong> from <strong><em>list</em></strong> and <strong>description</strong> from <strong><em>weather</em></strong> nodes, my JSON and Class structure are below</p>
  
  <pre><code>{
    "cod": "200",
    "message": 0.0284,
    "city": {
      "id": 2643743,
      "name": "London",
      "coord": {
        "lon": -0.12574,
        "lat": 51.50853
      },
      "country": "GB",
      "population": 0,
      "sys": {
        "population": 0
       }
    },
    "cnt": 1,
    "list": [
      {
        "dt": 1429268400,
        "temp": {
          "day": 12.21,
          "min": 4.86,
          "max": 13.18,
          "night": 4.86,
          "eve": 11.76,
          "morn": 12.21
        },
        "pressure": 1028.8,
        "humidity": 66,
        "weather": [
           {
             "id": 803,
             "main": "Clouds",
             "description": "broken clouds",
             "icon": "04d"
          }
        ],
        "speed": 5.9,
        "deg": 67,
        "clouds": 80
      }
    ]
  }
  </code></pre>
  
  <p><strong>C# Class</strong></p>
  
  <pre><code>public class WeatherForeCast
  {
      public string City { get; set; }
      public decimal Day { get; set; }
      public decimal Min { get; set; }
      public decimal Max { get; set; }
      public decimal Night { get; set; }
      public string Description { get; set; }
  }
  </code></pre>
  
  <p>Till date I'm familiar with using JSON.net for serialize and deserialize C# objects to JSON which has exact same structure.</p>