title: C# add item to JSON object
body: <p>I have this object and I want to add an other day to it.</p>
  
  <pre><code>[{
      "stone":"5kg",
      "years":
      [{
          "year":"2017",
          "stone":"5kg",
          "months":
          [{
              "month":"august",
              "stone":"0.5kg",
              "days":
              [{
                  "day":"14",
                  "stone":"0.1kg"
              }]
          }],
          "weeks":
          [{
              "week":"01",
              "stone":"0.5kg"
          }]
      }]
  }]
  </code></pre>
  
  <p>I have this stored in a file and I deserialize it like so:</p>
  
  <pre><code>string file = System.IO.File.ReadAllText(@"C:\Users\luuk\desktop\test1.json");
  var _data = JsonConvert.DeserializeObject&lt;List&lt;Data&gt;&gt;(file);
  </code></pre>
  
  <p>Now I want to add a day to it but I just can't figure it out.
  I tried something like this:</p>
  
  <pre><code>_data.Add(new Data()
  {
  
  });
  
  string json = JsonConvert.SerializeObject(_data);
  System.IO.File.WriteAllText(@"C:\Users\luuk\desktop\test1.json", json);
  </code></pre>
  
  <p>but I can only access years[] and stone in there.</p>
  
  <p>These are my classes:</p>
  
  <pre><code>public class Data
  {
      public string stone { get; set; }
      public List&lt;Years&gt; years { get; set; }
  }
  
  public class Years
  {
      public string year { get; set; }
      public string stone { get; set; }
      public List&lt;Months&gt; months { get; set; }
      public List&lt;Weeks&gt; weeks { get; set; }
  }
  
  public class Months
  {
      public string month { get; set; }
      public string stone { get; set; }
      public List&lt;Days&gt; days { get; set; }
  }
  
  public class Days
  {
      public string day { get; set; }
      public string stone { get; set; }
  }
  
  public class Weeks
  {
      public string week { get; set; }
      public string stone { get; set; }
  }
  </code></pre>
  
  <p>So how can I add an other day to the object?</p>
  
  <p>(I have translated all the variabels in my code from dutch to english so there my be some that I forgot or some typo's)</p>