title: How can I send an javascript object/array as key-value pairs via an AJAX post with easyXDM?
body: <p>Recently I realized that I needed to use <a href="https://github.com/oyvindkinsey/easyXDM">easyXDM</a> instead of jQuery's <code>$.ajax</code> in order to make a cross domain post request. After getting easyXDM set up I see that the functions line up fairly closely:</p>
  
  <p>jQuery:</p>
  
  <pre><code>$.ajax({
      url: "/ajax/",
      method: "POST",
      data: myData
  });
  </code></pre>
  
  <p>easyXDM:</p>
  
  <pre><code>xhr.request({
      url: "/ajax/",
      method: "POST",
      dataType: 'json', // I added this trying to fix the problem, didn't work
      data: myData
  });
  </code></pre>
  
  <p>myData is setup something like:</p>
  
  <pre><code>myData = {};
  myData[1] = 'hello';
  myData[2] = 'goodbye';
  myData[3] = {};
  myData[3][1] = 'sub1';
  myData[3][2] = 'sub2';
  myData[3][3] = 'sub3';
  </code></pre>
  
  <p>When I make the request with jQuery it handles the sub fields properly, but not with easyXDM.</p>
  
  <p>Here is how the POST request comes into the server with jQuery:</p>
  
  <p><a href="http://img37.imageshack.us/img37/4526/screenshotwithshadow.png">screenshot-with-shadow.png http://img37.imageshack.us/img37/4526/screenshotwithshadow.png</a></p>
  
  <p>And here is how it comes in with easyXDM:</p>
  
  <p><a href="http://img204.imageshack.us/img204/4526/screenshotwithshadow.png">screenshot-with-shadow.png http://img204.imageshack.us/img204/4526/screenshotwithshadow.png</a></p>
  
  <p>How can I send an javascript object/array of key-value pairs via an easyXDM / XHR request like jQuery does?</p>