title: How to collect info from attributes and send them as an array?
body: <p>I want to make a JavaScript array contains the user's id of class <code>.user-status</code> to send to PHP by using ajax.</p>
  
  <p>This is my HTML:</p>
  
  <pre><code>&lt;div class="user-status" data-userid="159"&gt;&lt;/div&gt;
  &lt;div class="user-status" data-userid="221"&gt;&lt;/div&gt;
  &lt;div class="user-status" data-userid="3321"&gt;&lt;/div&gt;
  &lt;div class="user-status" data-userid="13112"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>This is my JavaScript:</p>
  
  <pre><code>$('.user-status').each(function() {
      $(this).attr('data-userid');
  });
  
  var users = ["", "", "", ""];
  
  jQuery.ajax({
      url: ajaxURL,
      data: {
          action : 'user_status',
          usersid: users
      },
      dataType: 'JSON',
      type: 'POST',
      success: function (response) {
  
      }
  });
  </code></pre>
  
  <p>Until here I can't continue I can't make the array of the user's id to can send it.</p>