title: Zend Jquery Ajax posting object literals to PHP and parsing them
body: <p>I have a very complex Jquery object that resembles a multidimensional array. Here is what it looks like using console.log</p>
  
  <blockquote>
    <p>[ </p>
    
    <p>[] id [
    "91900"
    ]
    location
    [
    "F43"
    , 
    "F44"
    ]
    prev_location
    [
    "F41"
    ]
    , </p>
    
    <p>[]
    id
    [
    "92305"
    ]
    location
    [
    "F38"
    , 
    "F39"
    ]
    prev_location
    [
    "F39"
    ]
    , </p>
    
    <p>[]
    id
    [
    "155972"
    ]
    location
    [
    "F35"
    ]
    prev_location
    [
    "F45"
    ]</p>
    
    <p>]</p>
  </blockquote>
  
  <p>Trying to send that to a Zend controller using JQUERY/AJAX, I do try to stringify it but it comes as just Array when I post it on controller.</p>
  
  <blockquote>
    <p>data = JSON.stringify(big_array)</p>
    
    <p>$.ajax({</p>
  
  <pre><code>          type: 'POST',
              dataType: 'json', 
              url: '/project/public/index/send', 
              async: false,
              data: {myJson:  data},
              success: function(response) {
              }
              });
  </code></pre>
  </blockquote>
  
  <p>Below is the controller, trying to output something so firebug can show me on HTML response at least something but nothing but Array shows up</p>
  
  <blockquote>
    <p>public function sendAction() {</p>
  
  <pre><code>  $data = $this-&gt;_request-&gt;getPost();
      $data_array = json_decode($data['myJson'], true);
      print_r($data_array);
  }
  </code></pre>
  </blockquote>
  
  <p>Any ideas?</p>