title: How to get associative array as output from jQuery.map?
body: <p>I'm using JQuery <a href="http://api.jquery.com/jQuery.map/" rel="noreferrer">map</a> function to get an array of inputs' values:</p>
  
  <pre><code>var inputs = $("[id^='field']");
  var values = inputs.map(function () { 
                               return $(this).val(); 
                          }).get();
  </code></pre>
  
  <p>I would like to get an associative array of [id, value]:</p>
  
  <pre><code>{
     id1: value1, 
     id2: value2
  }
  </code></pre>