Convert data attrs to get/post data
<p>How do I convert data attributes to valid post (or get) data?</p>

<pre><code>$('#nav').find('a').click(function(){
    var params = $(this).data();
    $.get({
        type: "get",
        url: "/view/",
        data: params
    });
})
</code></pre>

<p>I get this error:</p>

<pre><code>POST http://127.0.0.1/Site1/%5Bobject%20Object%5D/ 404 (NOT FOUND) 
</code></pre>
