title: Array - ajax to Symfony
body: <p>How to get in Symfony an array post by ajax request in jquery ?</p>
  
  <p>I did that :</p>
  
  <p>My jquery (array + ajax request):</p>
  
  <pre><code>var array_data_file = [];
  array_data_file['locale'] = $(this).data('locale');
  array_data_file['domain'] = $(this).data('domain');
  array_data_file['bundle'] = $(this).data('bundleName');
  array_data_file['content'] = textTrad;
  
  $.ajax({
          url: Routing.generate(locale + '__RG__new_translation'),
          data: array_data_file,
          type: "POST",
          success: function (data) {
              alert(data);
          }
      });
  </code></pre>
  
  <p>my php:</p>
  
  <pre><code>public function newTraductionAction(Request $request)
      {              
          $array_file = $this-&gt;get("request")-&gt;getContent();
          var_dump($array_file); die;
      }
  </code></pre>
  
  <p>My alert show 'null' ...</p>
  
  <p>thanks for your help (I'm a noob...)</p>