title: How to convert JSON deep object to URL params in JavaScript?
body: <p>I want to convert deep JSON to URL params string. I have json:</p>
  
  <pre><code>{ filter: { dir: 184}, b:'a'}
  </code></pre>
  
  <p>and </p>
  
  <pre><code>{ filter: [1,2,3], b:'a'}
  </code></pre>
  
  <p>So I want the result string like this:</p>
  
  <pre><code> filter[dir]=188&amp;b=a
   filter[]=1&amp;filter[]=2&amp;filter[]=3&amp;b=a
  </code></pre>
  
  <p>How to do this in JavaScript (not Jquery)?</p>