title: Foreach loop for table in C# / jQuery
body: <p>I have a table that is generated like so: </p>
  
  <pre><code>&lt;div class="row"&gt;
  &lt;div class="col-md-12"&gt;
      &lt;div id="calendar"&gt;&lt;/div&gt;
      &lt;table id="report" class="table"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Event&lt;/th&gt;
                  &lt;th&gt;Start Date&lt;/th&gt;
                  &lt;th&gt;End Date&lt;/th&gt;
                  &lt;th&gt;Status&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody /&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>and populated using javascript:</p>
  
  <pre><code>var tableDetails = [
      data.title,
      $.fullCalendar.formatDate(startDate, "dd MMMM yyyy"),
      $.fullCalendar.formatDate(endDate, "dd MMMM yyyy"),
      data.published ? "Published" : "Not Published"
  ];
  
  var row = $("&lt;tr&gt;&lt;/tr&gt;");
  
  for (var i = 0; i &lt; tableDetails.length; i++) {
      row.append($("&lt;td&gt;&lt;/td&gt;").text(tableDetails[i]));
  }
  
  $("table#report &gt; tbody:last").append(row);
  </code></pre>
  
  <p>Is there a way of doing a foreach loop through the rows of the table so that I can get a List of all the Events to pass to a controller? Getting a list/array of strings would suffice, as I can simply add EventIds to the table which will uniquely identify the event.</p>