title: How to pass Array to JQuery Ajax Post?
body: <p>I have the following in a form </p>
  
  <p><code>&lt;input type="text" class="attr_values[]" value="1" /&gt;
  &lt;input type="text" class="attr_values[]" value="2" /&gt;
  </code></p>
  
  <p>And I am trying to pass all the values in the "attr_values" array so it can be posted via Ajax but the following doesn't work.</p>
  
  <pre><code>$.ajax({   
     url: 'index.php',
     type: 'POST',
     data:{ 
        attr_values: $('.attr_values').val()
  </code></pre>
  
  <p>How can this be done?</p>