title: JS unserializing a PHP serialized array
body: <p>I have an php made array:</p>
  
  <pre><code>&lt;?php information = array (
      'name' =&gt; 'John',
      'surname' =&gt; 'Doe'
  ); ?&gt;
  </code></pre>
  
  <p>I serialize this array with php and put it into input's value:</p>
  
  <pre><code>&lt;input type="hidden" id="information" name="information" value="&lt;?php echo htmlentities(serialize($hidden_information)); ?&gt;" /&gt;
  </code></pre>
  
  <p>Now JS part. I get this input's value:</p>
  
  <pre><code>var information = $('input#information').val();
  </code></pre>
  
  <p>And the question part: how can I now unserialize with JS this PHP serialized array? I want to unserialize 'information' variable.<br />
  When it will be unserialized, I want to alert name and surname from array.<br /></p>
  
  <p>Or probably, is there any possible way to get this name and surname without unserializing the array?</p>