title: No form data when while posting an array using AJAX
body: <p>I am currently using the following code to try and post an array using AJAX, however <code>console</code> shows no Form Data section when checking the Headers.</p>
  
  <pre><code>$(document).on("click", "#saveB", function () {
      var qry_array = [];
      var qry = query();
      var key = $('#save_key').val();
      qry_array[key]=qry;
      console.log(qry_array);
      $.ajax({
          type: "POST",
          url: "favourites.php",
          data: {
              query: qry_array
          },
          success: function (response) {
              console.log (response);
          }
      });
  }); 
  </code></pre>
  
  <blockquote>
    <p>favourites.php</p>
  </blockquote>
  
  <pre><code>error_reporting ( E_ALL );
      ini_set ( 'display_errors', 1 );
      function saveQueries() {
          if (isset ( $_POST ['query'] )) {
              $arr = $_POST['query'];
              var_dump($arr);
          } else {
              echo "Key Missing";
          }
      }
      saveQueries ();
  </code></pre>
  
  <p>The response from <code>console</code> is <code>Key Missing</code> which means my <code>query</code> isn't being posted, why could this be??</p>