title: Convert JS array to object
body: <p>What is the best way to convert array: </p>
  
  <pre><code>['a', {java:'script'}, 'b', 23, 'c', ['qwe','rty']] 
  </code></pre>
  
  <p>to object: </p>
  
  <pre><code>{a:{java:'script'}, b: 23, c: ['qwe','rty']}
  </code></pre>