title: Serialize data-attributes
body: <p>I have a drag and drop system, and each dropped item receives three data-attributes.</p>
  
  <ul>
  <li>data-id </li>
  <li>data-order</li>
  <li>data-content</li>
  </ul>
  
  <p>Now I should put these attributes into a multidimensional array. It should look like this:</p>
  
  <p>data-order = "0" [data-id = "1", data-content = "blabla"];
  data-order = "1" [data-id = "2", data-content = "another content"];</p>
  
  <p>But I have no idea how to achieve this. Haven't working with arrays in jQuery yet.</p>
  
  <p>Thanks for the help!</p>
  
  <p>Here's something what I've been trying, but without succes:</p>
  
  <pre><code>&lt;li class="dropped" data-order="0" data-id="1" data-content="blabla"&gt;&lt;/li&gt;
  &lt;li class="dropped" data-order="0" data-id="2" data-content="another content"&gt;&lt;/li&gt;
  
  $(".send").click(function() {
  
      var itterate = $(".dropped");
      var data_array = new Array();
  
      for (var i in itterate.data()) {
  
          var sub_array = new Array();
          sub_array['data-order'] = i;
          sub_array['data-id'] = itterate.data()[i];
          sub_array['data-content'] = itterate.data([i]);
  
          data_array.push(sub_array);
  
      }
  
      var serialized = $.param(itterate.serializeArray().concat(data_array));
  
      $("#result").text(serialized);
  
  });
  </code></pre>
  
  <p>Here's a <a href="http://jsfiddle.net/hk120Lhq/" rel="nofollow">jsfiddle</a></p>