title: Send list/array as parameter with jQuery getJson
body: <p>I have the following where I'm trying to send list/array to MVC controller method:</p>
  
  <pre><code>var id = [];
  var inStock = [];
  
  $table.find('tbody&gt;tr').each(function() {
      id.push($(this).find('.id').text());
      inStock.push($(this).find('.stocked').attr('checked'));
  });
  
  var params = {};
  params.ids = id;
  params.stocked = inStock; 
  
  $.getJSON('MyApp/UpdateStockList', params, function() {
      alert('finished');
  });    
  </code></pre>
  
  <p>in my contoller:</p>
  
  <pre><code>public JsonResult UpdateStockList(int[] ids, bool[] stocked) { }
  </code></pre>
  
  <p>both paramaters are null.</p>
  
  <p>Note that if I change the params to single items</p>
  
  <pre><code>params.ids = 1;
  params.stocked = true; 
  
  public JsonResult UpdateStockList(int ids, bool stocked) { }
  </code></pre>
  
  <p>then it works ok, so I don't think it's a routing issue.</p>