title: Pass array of objects to MVC Controller Action via JQuery AJAX, Action Parameter is always null
body: <p>I am having following controller action in ASP.NET MVC</p>
  
  <pre><code>[HttpPost]
      public JsonResult Save(List&lt;Mixing&gt; lstmixing)
      {
          int TMPMIXINGNO=0;
          foreach (Mixing mixing in lstmixing)
          {
              TMPMIXINGNO = mixing.MIXINGNO;
              Mixing obj = new Mixing();
              obj.MIXINGNO = mixing.MIXINGNO;
              obj.CARET = mixing.CARET;
              obj.PRICE = mixing.PRICE;
              obj.DATE = mixing.DATE;
              obj.DETAILS = mixing.DETAILS;
              obj.CREATE_TIMESTAMP = DateTime.Now;
              obj.LAST_EDIT_TIMESTAMP = DateTime.Now;
              obj.INVOICEDETAILID = mixing.INVOICEDETAILID;
              db.Mixings.Add(obj);
              db.SaveChanges();
          }
          var result = db.Mixings.Where(p =&gt; p.MIXINGNO == TMPMIXINGNO).ToList();
          return Json(result);
  
      }
  </code></pre>
  
  <p>I am planning to send array of object of type <code>mixing</code> to <code>List&lt;Mixing&gt; lstmixing</code> with following jquery ajax code. But <code>lstmixing</code> is always null.</p>
  
  <pre><code>btnAdd.click(function () {
          var DATA = [];
          var ID = $(".invoiceno").val();
          var serviceURL = '@Url.Action("Save", "Mixing")';
          $(".invoice_table tbody tr").each(function () {
              var MIXINGNO = $(".mixingno").val();
              var DATE = $(".date").val();
              var INVOICEDETAILID = $(this).find("td:first").text();
              var CARET = $(this).find("td:eq(3) input").val();
              var PRICE = $(this).find("td:eq(2)").text();
              var DETAILS = $(".details").val();
  
              if (CARET != "") {
                  DATA.push("{'MIXINGNO':'" + MIXINGNO + "','DATE': '" + DATE + "','INVOICEDETAILID': '" + INVOICEDETAILID + "','CARET': '" + CARET + "','PRICE': '" + PRICE + "','DETAILS': '" + DETAILS + "'}");
              }
  
  
          })
          alert(DATA);
          $.ajax({
              type: "POST",
              url: serviceURL,
              data: JSON.stringify({ 'lstmixing': "[" + DATA + "]" }),
              traditional:true,
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (data) {
                  var str = "";
                  $.each(data, function () {
                      var obj = $(this)[0];
                      str += "&lt;tr&gt;";
                      str += "&lt;td&gt;" + obj.ID + "&lt;/td&gt;";
                      str += "&lt;td class='text-right'&gt;" + parseFloat(obj.CARET).toFixed(2) + "&lt;/td&gt;";
                      str += "&lt;td class='text-right'&gt;" + parseFloat(obj.PRICE).toFixed(2) + "&lt;/td&gt;";
                      str += "&lt;td&gt;&lt;input type='text' class='form-control text-right'' /&gt;&lt;/td&gt;";
                      str += "&lt;/tr&gt;";
                  });
                  $(".invoice_table tbody").html(str);
              }
  
          });
      });
  </code></pre>
  
  <p><strong>JSON REQUEST PAYLOAD IN GOOGLE CHROME Developer Tools-Network</strong></p>
  
  <pre><code>lstmixing:"[{'MIXINGNO':'2','DATE': '20/01/2017','INVOICEDETAILID': '10','CARET': '100','PRICE': '100.00','DETAILS': 'NO'},{'MIXINGNO':'2','DATE': '20/01/2017','INVOICEDETAILID': '11','CARET': '200','PRICE': '200.00','DETAILS': 'NO'}]"
  </code></pre>
  
  <p><strong>Model - Mixing.cs</strong></p>
  
  <pre><code>public class Mixing
  {
      [Key]
      public int ID { get; set; }
  
      [Display(Name = "Mixing No")]
      [Required]
      public int MIXINGNO { get; set; }
  
      [Display(Name = "Date")]
      [DataType(DataType.Date)]
      [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
      public DateTime DATE { get; set; }
  
  
      [Display(Name = "Invoice Detail ID")]
      [Required]
      public int INVOICEDETAILID { get; set; }
  
      [Display(Name = "Caret")]
      [Required]
      public decimal CARET { get; set; }
  
      [Display(Name = "Price")]
      [Required]
      public decimal PRICE { get; set; }
  
      [Display(Name = "Details")]
      public string DETAILS { get; set; }
  
      [ScaffoldColumn(false)]
      public DateTime CREATE_TIMESTAMP { get; set; }
      [ScaffoldColumn(false)]
      public DateTime LAST_EDIT_TIMESTAMP { get; set; }
  }
  </code></pre>
  
  <p>Whats wrong here?</p>