title: Loop checkboxes and built JavaScript object literal
body: <p>Hey all i am trying to figure out a way to add the data to a JS object when i loop to see which checkboxes on the page are checked:</p>
  
  <pre><code>jQuery('#doaction').click(function () {
      var bulkSelected = jQuery('#bulkAction').val();
      var checkCount = 1;
  
      if (bulkSelected == 0) {
          console.log('no bulk selected category');
          jQuery('#overlay-shade').fadeOut(300);
      } else {
          var doBulk = {
              called: '' + bulkSelected + '',
          };
  
          jQuery('input[type=checkbox]').each(function () {                           
              if (jQuery(this).attr('id') != 'selectAll') {
                  var isChecked = (this.checked ? true : false);
  
                  if (isChecked == true) {
                      console.log(jQuery(this).attr('id'));
                      console.log(jQuery(this).attr('data-accnum'));
                  }
                  checkCount++;
              }
          });
  
      }
  </code></pre>
  
  <p>the <strong>.attr('data-accnum')</strong> has the number as you see below. I need it to be in this format: </p>
  
  <p><em>(checkbox name: accnum)</em></p>
  
  <pre><code>var doBulk = {
      chk1: 52136523168,
      chk2: 54298851631
      ect..ect...
  };
  </code></pre>
  
  <p>How can i do that?</p>