title: json Array posting to mvc controller
body: <p>I want to post JSON array to MVC controller through AJAX POST as:</p>
  
  <pre><code> $.ajax({
                      type: 'POST',
                      data: json.stringify(totaldata),
                      traditional:true,
                      url: '/Builder/Save',
                      success: function () {
                          alert("Playlist saved successfully!!");
                      }
                  })
  </code></pre>
  
  <p>and my controller code is have made array of one ViewModel &amp; want to update those values as.</p>
  
  <pre><code>[HttpPost]
      public ActionResult Save(IList&lt;ItemEditViewModel&gt; data,long playlistid=0, string Title="")
      {
  
  
  
  
          for (int i = 0; i &lt; data.Count; i++)
          {
              var pc = db.PlaylistContents.FirstOrDefault(x =&gt; x.PlaylistContentId == data[i].ID);
              if (pc == null)
              {
                  pc = new PlaylistContent();
                  db.PlaylistContents.Add(pc);
              }
              pc.ContentMetaDataId = data[i].MetaID;
              pc.PlaylistContentSequenceId = i + 1;
          }
  
   db.SaveChanges();
              return RedirectToAction("Playlist", new {ID=playlistid });
  
  }
  </code></pre>
  
  <p>But the Object is set to null in Controller.</p>
  
  <p>My ViewModel is as,</p>
  
  <pre><code>public class ItemViewModel
  {
      public long ID{get;set;}
      public long MetaID{get;set;}
  }
  </code></pre>