title: Convert JavaScript object into URI-encoded string
body: <p>I got a JavaScript object which I would like to get <code>x-www-form-urlencoded</code>.</p>
  
  <p>Something like <code>$('#myform').serialize()</code> but for objects.</p>
  
  <p>The following object:</p>
  
  <pre><code>{
      firstName: "Jonas",
      lastName: "Gauffin"
  }
  </code></pre>
  
  <p>would get encoded to:</p>
  
  <p><code>firstName=Jonas&amp;lastName=Gauffin</code> (do note that special characters should get encoded properly)</p>