title: Ruby: How to turn a hash into HTTP parameters?
body: <p>That is pretty easy with a plain hash like </p>
  
  <pre><code>{:a =&gt; "a", :b =&gt; "b"} 
  </code></pre>
  
  <p>which would translate into </p>
  
  <pre><code>"a=a&amp;b=b"
  </code></pre>
  
  <p>But what do you do with something more complex like </p>
  
  <pre><code>{:a =&gt; "a", :b =&gt; ["c", "d", "e"]} 
  </code></pre>
  
  <p>which should translate into </p>
  
  <pre><code>"a=a&amp;b[0]=c&amp;b[1]=d&amp;b[2]=e" 
  </code></pre>
  
  <p>Or even worse, (what to do) with something like: </p>
  
  <pre><code>{:a =&gt; "a", :b =&gt; [{:c =&gt; "c", :d =&gt; "d"}, {:e =&gt; "e", :f =&gt; "f"}]
  </code></pre>
  
  <p>Thanks for the much appreciated help with that!</p>