title: Get data from Json file C#
body: <p>I have this Json file:</p>
  
  <pre><code>{"id":88319,"dt":1345284000,"name":"Benghazi",
  "coord":{"lat":32.12,"lon":20.07},
  "main":{"temp":306.15,"pressure":1013,"humidity":44,"temp_min":306,"temp_max":306},
  "wind":{"speed":1,"deg":-7},
  "weather":[
               {"id":520,"main":"rain","description":"light intensity shower rain","icon":"09d"},
               {"id":500,"main":"rain","description":"light rain","icon":"10d"},
               {"id":701,"main":"mist","description":"mist","icon":"50d"}
            ],
  "clouds":{"all":90},
  "rain":{"3h":3}}
  </code></pre>
  
  <p>I can read the "name": "Benghazi" normally but the "temp":306.15 I can not read because it is inside "main":{}</p>
  
  <p>I'm using a simple way to read, here is my C# code:</p>
  
  <pre><code>public class SkyWeather
  {
      string path = @"http://api.openweathermap.org/data/2.5/weather?q=Uberaba,br&amp;units=metric";
  
      string name;
      string temp;
  
      public string Name { get { return name; } set { name = value; } }
      public string Temp { get { return temp; } set { temp = value; } }
  
      public string GetTemperature()
      {
          var json = "";
  
          try
          {
              json = new WebClient().DownloadString(path);
          }
          catch (Exception e)
          {
              return e.ToString();
          }
  
          string text = (string)json;
  
          SkyWeather w = JsonConvert.DeserializeObject&lt;SkyWeather&gt;(text);
  
          return w.temp;
      }
  }
  </code></pre>
  
  <p>How can I read it?</p>