title: jQuery Ajax POSTing array to ASP.NET MVC Controller
body: <p>I'm missing something here. I've got this jQuery JavaScript:</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "/update-note-order",
      dataType: "json",
      data: {
          orderedIds: orderedIds,
          unixTimeMs: new Date().getTime()
      }
  });
  </code></pre>
  
  <p>Where <code>orderedIds</code> is a JavaScript number array (e.g. <code>var orderedIds = [1, 2]</code>).</p>
  
  <p>The handling <code>Controller</code> method is:</p>
  
  <pre><code>[HttpPost]
  public void UpdateNoteOrder(long[] orderedIds, long unixTimeMs)
  {
      ...
  }
  </code></pre>
  
  <p>When I put a <code>Debugger.Break()</code> in <code>UpdateNoteOrder()</code>, <code>orderedIds</code> is <code>null</code> in the Watch window. (<code>unixTimeMs</code>, however, has a numeric value.)</p>
  
  <p>How do I pass the number array through <code>$.ajax()</code> such that <code>orderedIds</code> is a <code>long[]</code> in my controller?</p>