title: Sending a key value array in $.ajax
body: <p>Hi every one I need to send an array as the data of a post request using $.ajax, this array is a key value array,
  e.g</p>
  
  <pre><code>fields['BrandName'] = "Fiat,BMW"
  fields['year'] =  "2004,2005"
  </code></pre>
  
  <p>i tried this </p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: url,
      dataType: 'json',
      data: {'adfields[]': fields},
      success: function(data){
          alert("passed");                
      },
      error: function(data, status){
          alert("error has occurred");
      }
  });
  </code></pre>
  
  <p>but it doesn't work, I watch the request using wireshark, but nothing gets sent in the request, something else when I try to do fields.length .. i get zero although fields['BrandName'] is defined and has a value
  Any help ??</p>