jQuery get values of checked checkboxes into array
<p>I am trying to get values of all checkboxes that are currently checked and store them into an array. Here is my code so far:</p>

<pre><code> $("#merge_button").click(function(event){
    event.preventDefault();
    var searchIDs = $("#find-table input:checkbox:checked").map(function(){
      return $(this).val();
    });
    console.log(searchIDs);
  });
</code></pre>

<p>However this outputs more than I need. I not only get the values, but some other stuff I don't want.</p>

<blockquote>
  <p>["51729b62c9f2673e4c000004", "517299e7c9f26782a7000003",
  "51729975c9f267f3b5000002", prevObject: jQuery.fn.jQuery.init[3],
  context: document, jquery: "1.9.1", constructor: function, init:
  function…]</p>
</blockquote>

<p>I would like just ID's (first 3 items in this case).</p>

<p>By using <code>$.each</code> and pushing values to an array I get desired output:</p>

<pre><code>$("#find-table input:checkbox:checked").each(function(){ myArray.push($(this).val()); })
</code></pre>

<blockquote>
  <p>["51729b62c9f2673e4c000004", "517299e7c9f26782a7000003",
  "51729975c9f267f3b5000002"]</p>
</blockquote>

<p>However I'd like to use <code>$.map</code>, since it saves me a line of code and is prettier.</p>

<p>Thanks</p>
