title: How to convert JArray to generic List<>
body: <p>Via an http Post, I send html FormData to my Web Api2 controller.
  The FormData contains one or more images, as well as client properties.</p>
  
  <p>My front end Angular 5 service sends the <code>http post</code> (working fine):</p>
  
  <pre class="lang-js prettyprint-override"><code>var url = this.host + 'import/MediaUpload';
  
  return this.http.post(url, formData, options)
              .map((result: any) =&gt; result._body)
              .catch(this.handleError);
  </code></pre>
  
  <p>I would like to convert the FormData to a generic List of MediaInfo class (defined below this <code>MediaUpload()</code> method) : </p>
  
  <pre><code>public async Task&lt;HttpResponseMessage&gt; MediaUpload(int projectId, int sectionId)
  {
      // Check if the request contains multipart/form-data.  
      if (!Request.Content.IsMimeMultipartContent())
      {
          throw new HttpResponseException(HttpStatusCode.UnsupportedMediaType);
      }
  
      var provider = await Request.Content.ReadAsMultipartAsync&lt;InMemoryMultipartFormDataStreamProvider&gt;(new InMemoryMultipartFormDataStreamProvider());
      //access form data  
      NameValueCollection formData = provider.FormData;
  
      List&lt;MediaInfo&gt; listMedia = new List&lt;MediaInfo&gt;();
  
      //dynamic jsonData = JObject.Parse(formData["MediaInfo"]); // THROWS ERROR
      JArray ary = JArray.Parse(formData["MediaInfo"]);
  
      foreach (var item in ary) {
          //listMedia.Add((MediaInfo)item);   // ???
          Console.WriteLine(item);
      }
  
      //access files  
      IList&lt;HttpContent&gt; files = provider.Files;
  
      HttpContent file1 = files[0];
      var thisFileName = file1.Headers.ContentDisposition.FileName.Trim('\"');            
  
      // additional file upload code removed, working fine..
  
      var response = Request.CreateResponse(HttpStatusCode.OK);
      response.Headers.Add("DocsUrl", URL);
      return response;
  }
  
  public class MediaInfo
  {
      public string PatientID { get; set; }
      public string PatientFirstName { get; set; }
      public string PatientLastName { get; set; }
      public string PatientUID { get; set; }
      public string PatientDOB { get; set; }
      public string ExamDate { get; set; }
      public string ExamDevice { get; set; }
      public string SerialNo { get; set; }
      public string Eye { get; set; }
      public int DeviceID { get; set; }
      public int CSIInstanceID { get; set; }
      public int MediaNo { get; set; }
      public string Procedure { get; set; }
      public string FileName { get; set; }
      public int FileSize { get; set; }
  }
  </code></pre>
  
  <p>I thought I could do something like :</p>
  
  <pre><code> listMedia.Add((MediaInfo)item;
  </code></pre>
  
  <p>But I'm missing the correct conversion somewhere.</p>