title: How to process a List<object> in jquery ajax?
body: <p>The situation: ajax call that calls an MVC action which returns <code>List&lt;CustomObject&gt;</code>. </p>
  
  <p>During debugging, the MVC side shows that I have, for example, 20+ records with about 15 columns with data in an entity framework object format. That is to say that I can see the data in record.id and record.name like I should.</p>
  
  <p>The data list is passed back to the ajax.success callback function but appears to only be a string describing object of type <code>System.Collections.Generic.List'1[CustomObject]'</code>. That is to say, it is just a string: <code>System.Collections.Generic.List'1[CustomObject]'</code></p>
  
  <p>How the devil do I get that data either </p>
  
  <ol>
  <li><p>readable by javascript </p></li>
  <li><p>into a javascript/jquery readable opbject.</p></li>
  </ol>
  
  <p>Edit: code sample:</p>
  
  <pre><code>    public async Task&lt;List&lt;visitorInformation&gt;&gt; GetChartData(string startDate, string endDate) {
          //coalesce date into a single array
          DateTime[] dateRange = new DateTime[2];
  
          DateTime.TryParseExact(startDate, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateRange[0]);
          DateTime.TryParseExact(endDate, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateRange[1]);
  
          DateTime dtStartDate = dateRange[0];
          DateTime dtEndDate = dateRange[1];
          return await db.visitorInformation.Where(w =&gt; w.dateOfVisit &gt;= dtStartDate &amp;&amp; w.dateOfVisit &lt;= dtEndDate).ToListAsync();
      }
  </code></pre>