title: Flatten a javascript object to pass as querystring
body: <p>I have a javascript object that I need to flatten into a string so that I can pass as querystring, how would I do that? i.e:</p>
  
  <p><code>{ cost: 12345, insertBy: 'testUser' }</code> would become <code>cost=12345&amp;insertBy=testUser</code></p>
  
  <p>I can't use jQuery AJAX call for this call, I know we can use that and pass the object in as <code>data</code> but not in this case. Using jQuery to flatten to object would be okay though.</p>
  
  <p>Thank you.</p>