title: javascript: json object with arrays serialized for use in .NET MVC action
body: <p>simple question:</p>
  
  <p>I want to post some data to an action like this:</p>
  
  <pre><code>        var data = {
              Prop1 : 'a',
              ListOfObjects: [{ PropertyA: 1, PropertyB: 2 }, { PropertyA: 3, PropertyB: 4}]
          };
  </code></pre>
  
  <p>When I send this data to my Action via JQuery AJAX, my model is partially filled:</p>
  
  <pre><code>public class MyObject{
      public int PropertyA {get;set;}
      public int PropertyB {get;set;}
  }
  
  public class MyModel{
      public string Prop1 {get;set;}
      public List&lt;MyObject&gt; ListOfObjects {get;set;}
  }
  
  public JsonResult Save(MyModel model)
  .
  .
  .
  model.Prop1 //Is okay!
  model.ListOfObjects[0] // is okay too...List has 2 items
  model.ListOfObjects[0].PropertyA; //Nope...no values inside this model...
  </code></pre>
  
  <p>I guess the reason is, that the serialized HTTP Data are wrong, they are like
  ListOfObjects[0][PropertyA] &lt;- but it should be ListOfObjkects[0].PropertyA</p>
  
  <p>Does anyone know what to do?!</p>
  
  <p>EDIT:
  My JQuery AJAX code:</p>
  
  <pre><code>$.ajax({
                      type: 'POST',
                      url: saveURL,
                      dataType: 'json',
                      data: data,
                      complete: function () {
                          DeleteMainLoader();
                      },
                      success: function success(data, textStatus, jqXHR) {
                          if (data.success) {
                              alert('win!')
                          }
                          else {
                              alert('error');
                          }
  
                      },
                      error: function (jqXHR, textStatus, errorThrown) {
                          alert('errrrrooooorrrr');
                      }
                  });
  </code></pre>