title: Cant send table data to mvc controller using ajax
body: <p>Hello I Have a Model Like </p>
  
  <pre><code>public class Delivery
  {
      public string Description{get,set}
      public string Quantity {get,set}
      public Date Date{get,set}
      public Int LoactionId {get,set}
  }
  </code></pre>
  
  <p>I have an html dynamic generated table with data  and i used ajax to send those data to controller  the code is </p>
  
  <pre><code>function Save(){ 
      var delivery =[];
  
  
      $('#table2 tbody').each(function () {
  
          delivery.push({
              Description:$(this).closest('tr').find('#description').text();
          Quantity:$(this).closest('tr').find('input[name="last_name[]"]').val();
          Date:  $(this).closest('tr').find('.datepicker_recurring_start').val();
          LocationId:$(this).closest('tr').find("#sel option:selected").val(); 
      });
  
      $.ajax
      ({
          type: "POST",
          contentType: "application/json; charset=utf-8",
          url: "Save/Create/",
          data: JSON.stringify({ Delivery: delivery }),
          dataType: "json",
          success: function (data) {
              alert('Success')
          },
          error: function (x, e) {
              alert('Failed')
          }
      });
  
  }
  </code></pre>
  
  <p>And My Action method is </p>
  
  <pre><code>public JsonResult Create(List&lt;Delivery&gt; Delivery )
  {
  }
  </code></pre>
  
  <p>But its not working  Its not getting data from the table .I dont know what I am missing or my code is wrong . If there any way that i can pass one by one not using array anyone can suggest me that . I also added a fiddle of that dynamic table now some are empty but  note that each one will have value</p>
  
  <p>Thanks for help.</p>
  
  <p><a href="https://jsfiddle.net/0q3e7Lcz/1/" rel="nofollow noreferrer">Dynamic generated table</a></p>