title: jquery sending form data and a json object in an ajax call
body: <p>I'm making a call to another ajax page, the call posts a json object.
  I also need to send data from a form 
  (not using submit - I have the ajax call attached to a button which uses <code>e.preventDeault()</code>).</p>
  
  <p>The call is as folows:</p>
  
  <pre><code>var myUrl = 'sendswatch-data.php';
              $.ajax({
                  url: myUrl,
                  data: {'swatchid[]':swatchArray}, 'formdata':$('#orderData').serialize()},
                  type: "POST",
                  error: function(xhr, statusText, errorThrown){
                      // Work out what the error was and display the appropriate message
                  },
                  success: function(myData){
                      $('#tabsampleorder').html(myData);
                      $('.tabber').hide();
                      $('#tabsampleorder').show();
                  }
              });
  </code></pre>
  
  <p>I have a form on the page id of formdata.</p>
  
  <p>How do I send this as well as the json object? I've tried</p>
  
  <pre><code>data: {'swatchid[]':swatchArray}, 'formdata':$('#orderData').serialize()},
  </code></pre>
  
  <p>but that's generating an error.</p>