jquery serialize not sorted?
<p>I have a javascript function that reads an entire form into a serialized</p>

<pre><code> $.ajax({
    type: 'POST',
    url: '/cart/update.js',
    dataType: 'json',
    data: $("#add-to-cart").serialize() + '&amp;id=' + $("select[name=id]").val(),
    success: goToCart,
    error: goToCart
  });
</code></pre>

<p>However it seems to be not organizing the data. It should be <code>pattern, line 1, line 2, line 3, line 4, line 5, line 6</code>, however it seems to be going <code>line 1, line 2, line 3, line 4, pattern, line 5, line 6</code>.</p>

<p>Is there a way to sort the serialized data somehow?</p>

<p>html is in proper order, pattern is first then lines 1-6.</p>

<p>Any help?</p>
