title: How to deserialize a json file with multidimensional array to convert it to object in c#
body: <p>I have the following Json file</p>
  
  <pre><code>[
      {
          "photos": [
              {
                  "photo": "http://example.com/media/origin/11820846/photo_80_4_.jpg",
                  "photo_order": 1,
                  "caption": "photo_80_4_"
              }
          ],
          "id": "11820846"
      }
  ],
  [
      {
          "photos": [
              {
                  "photo": "http://example.com/media/new_images/
     bookingpal/united%20arab%20emirates/
     12564676/product65093-015.jpg",
                  "photo_order": 1,
                  "caption": ""
              }
          ],
          "id": "12564676"
      }
  ]
  </code></pre>
  
  <p>The original file is longer but basically it repeats.  </p>
  
  <p>With the following code I can see the data for the first array but it fails when it gets to the second array. </p>
  
  <p>Why?</p>
  
  <pre><code>class Program {
      static void Main(string[] args) {
          using (var st = new StreamReader(@"C:\Users\mc\Desktop\photojson.txt")) {
  
              string Json = st.ReadToEnd();
              List&lt;TVID&gt; IdList = JsonConvert.DeserializeObject&lt;List&lt;TVID&gt;&gt;(Json);
  
              foreach (var ids in IdList) {
                  Console.WriteLine(ids.ID);
                  foreach (var myphoto in ids.photos) {
                      Console.WriteLine(myphoto.Photo + "," + myphoto.Photo_order + "," +
                                        myphoto.Caption);
                      Console.Read();
                  }
              }
          }
      }
  
      public class TVPhotos {
          public string Photo { get; set; }
          public string Photo_order { get; set; }
          public string Caption { get; set; }
      }
  
      public class TVID {
          public string ID { get; set; }
          public List&lt;TVPhotos&gt; photos { get; set; }
      }
  }
  </code></pre>