jquery array of checkboxes contains the last one checked
<p>I have a group of checkboxes that I'm trying to pass through POST via AJAX/PHP.  When I fill the array it's only picking up the last one.  </p>

<p>HTML</p>

<pre><code>&lt;input type="checkbox" name="committee[]" value="membership"&gt;Membership &lt;br/&gt;
&lt;input type="checkbox" name="committee[]" value="operations"&gt;Operations &lt;br/&gt;
&lt;input type="checkbox" name="committee[]" value="membership"&gt;Board &lt;br/&gt;
</code></pre>

<p>Javascript</p>

<pre><code>$("#save").click(function (e) { 
 ...
 var committee = { 'committee[]' : []};
  $('input:checked').each(function(){
   committee['committee[]'].push($(this).val());
 });

 $.ajax({
  url: 'save.php',
  type: 'POST',
  data: {
  ...
  committee: committee
  }
 });
});
</code></pre>

<p>On the <code>save.php</code> all I'm doing at this point is <code>print_r($_POST);</code> and seeing that only the last checked box shows up.  I know it's something I'm doing wrong in the <code>input:checked</code> function, but I'm not sure what.  </p>
