title: How to push name value objects into an array?
body: <p>I'm trying to implement a little ajax form using jQuery.</p>
  
  <p>My simplified form looks something like this, I gave all the inputs and textareas the class="form_one_inputs" :</p>
  
  <pre><code>&lt;form action="myform" id="form_one" method="post" &gt;
       &lt;div class="formleft"&gt;
            &lt;p&gt;Name&lt;/p&gt;
       &lt;/div&gt;
       &lt;div class="formright"&gt;
            &lt;input name="name" type="text" class="form_one_inputs" &gt;&lt;/div&gt;
       &lt;/div&gt;
   ...
             &lt;input id="email" maxlength="45" name="email" class="form_one_inputs" type="email"&gt;
   ...
             &lt;textarea id="Comments" name="Comments" class="form_one_inputs" &gt;
   ...
  </code></pre>
  
  <p>In my jquery function, I can make my ajax submit work if I put all the form data into this object:</p>
  
  <pre><code> var formData = {
      'name'      : $('input[name=name]').val(),
      'email'     : $('input[name=email]').val(),
      'Comments'  : $('textarea[name=Comments]').val(),
      'subject'   : $('input[name=subject]').val()
    };
  </code></pre>
  
  <p>I can loop through all the inputs and textareas like this : </p>
  
  <pre><code>$('.form_one_inputs').each(function(index, obj){
       alert(index + " : " + obj.value +  ":" + obj.name);
       //
       // need to add each input to formData object
   });
  </code></pre>
  
  <p>How can I generalize my code to put all the elements of class="form_one_inputs" into the formData object.  I've been trying, but not succeeding with formData.push()</p>