Mapping input responses into an array with jQuery
<p>I have the following code in jQuery that returns an array called responses. The array returned is based on the
position of the input elements. </p>

<pre><code>var resp = $("input[id^= 'Answer_Response']");
responses: jQuery.map(resp, function (a) { return a.checked; })

&lt;input id="Answer_Response[2]" name="Answer.Response[2]" type="checkbox" /&gt; 
&lt;input id="Answer_Response[0]" name="Answer.Response[0]" type="checkbox" /&gt;
&lt;input id="Answer_Response[1]" name="Answer.Response[1]" type="checkbox" /&gt;
&lt;input id="Answer_Response[4]" name="Answer.Response[4]" type="checkbox" /&gt;
&lt;input id="Answer_Response[3]" name="Answer.Response[3]" type="checkbox" /&gt;
</code></pre>

<p>so When the inputs are:</p>

<pre><code> false    // for Answer.Response[2]
 true     // for Answer.Response[0]
 true     // for Answer.Response[1]
 false    // for Answer.Response[4]
 true     // for Answer.Response[3]
</code></pre>

<p>the responses array looks like false, true, true, false, true</p>

<p>what I need is for the array returned to be based on the id number for the elements. So for example I need an
array returned that looks like this: true, true, false, true, false</p>

<pre><code>  true    // for Answer.Response[0]
  true    // for Answer.Response[1]
  false   // for Answer.Response[2]
  true    // for Answer.Response[3]
  false   // for Answer.Response[4]
</code></pre>

<p>Is there some way that I can do this in jQuery? please note that I can't change the way that the responses are displayed. I've been asked to do this all in jQuery.</p>

<p>I hope someone can give some advice. I guess I just need some different way to do the mapping of resp but I'm not sure how I can do it.</p>
