title: Node.js: arrays in query
body: <p>There is the request: <code>/test?strategy[]=12&amp;strategy[]=23</code></p>
  
  <p>In PHP we may receive array with this code:</p>
  
  <pre><code>$_GET['strategy']
  </code></pre>
  
  <p>It will be array even if it has 1 param.</p>
  
  <hr>
  
  <p>In JS we can use this code:</p>
  
  <pre><code>var query = url.parse(request.url, true).query;
  var strategy = query['strategy[]'] || [];
  </code></pre>
  
  <p>But if there will be 1 param <code>strategy</code>( <code>/test?strategy[]=12</code>), it will not be an array.<br>
  I think it's a dirty solution to check count of elements and convert <code>strategy</code> to <code>[strategy ]</code> if it equals to 1.</p>
  
  <p>How can I get an array from query in Node.js?</p>