title: Convert js Array() to JSon object for use with JQuery .ajax
body: <p>in my app i need to send an javascript Array object to php script via ajax post. Something like this:</p>
  
  <pre><code>var saveData = Array();
  saveData["a"] = 2;
  saveData["c"] = 1;
  alert(saveData);
  $.ajax({
      type: "POST",
      url: "salvaPreventivo.php",
      data:saveData,
      async:true
      });
  </code></pre>
  
  <p>Array's indexes are strings and not int, so for this reason something like saveData.join('&amp;') doesn't work.</p>
  
  <p>Ideas?</p>
  
  <p>Thanks in advance</p>