title: sending array of objects to MVC4 controller with $http or $.ajax
body: <p>Apparently I am doing something wrong, Tried everything. </p>
  
  <p>Initially I needed to send array of objects to asp.net mvc controller using angular's $http, well it didn't work. </p>
  
  <p>Then I tried to use jquery. I've tried <code>$.get</code>, <code>$.post</code>, <code>$.ajax</code> methods with different parameters (traditional, non-traditional, with <code>dataType:'json'</code>, without it - still can't pass the values. This thing is killing me. </p>
  
  <pre><code>$.ajax(
    url: '/Home/Foo'
    data: items: [{'name':'some'},{'name':'other'}])
  
  public JsonResult Foo(Item[] items)
  {
      return Json(items, JsonRequestBehavior.AllowGet);
  }
  
  public class Item
  {
     public string name { get; set; }
  }
  </code></pre>
  
  <p>The best what I could get out of it - it recognizes items as Item[] array but every <code>name</code> value is null</p>