title: pass array of numbers from ajax to controller
body: <p>I know this is a popular topic and I've tried all of the solutions I could find already out there to no avail.  I've used all the solutions included for this questions: <a href="https://stackoverflow.com/q/10218811/1735836">Pass a List from javascript to controller</a>.  I've simplified my test to ridiculously simple.  I get into the controller but my controller input param is {int[0]}.  I confirmed my array data looks good in the JavaScript and ajax call.</p>
  
  <p>Can anyone please tell me what I am missing?</p>
  
  <h1>JavaScript Code</h1>
  
  <pre><code>var selectedIds = [];
  selectedIds.push(565);
  selectedIds.push(573);
  selectedIds.push(571);
  // selectedIds = [565, 573, 571]
  
  $.ajax({
      type: "POST",
      traditional: true,
      dataType: "json",
      data: { "ids": JSON.stringify(selectedIds) },
      //data: { "ids": selectedIds},
      //data: { ids: selectedIds},
      url: "api/services/getbuildingsbyid",
      success: function (result) {
          return result;
      }
  });
  </code></pre>
  
  <h1>Controller Code</h1>
  
  <pre><code>[HttpPost]
  public bool GetBuildingsById(int[] ids)
  {
      var lookAtIds = ids;     // {int[0]}
      return true;
  }
  </code></pre>