title: CakePHP 3 - Cookie
body: <p>I have a problem when reading an associative array that's inside a cookie. </p>
  
  <ol>
  <li>)</li>
  </ol>
  
  <p>When I set it like this in the controller: </p>
  
  <pre><code>$this-&gt;set('info', $this-&gt;Cookie-&gt;read('info'));
  </code></pre>
  
  <p>I can read data this way in the view: </p>
  
  <pre><code>$info[0]['records'];
  </code></pre>
  
  <p>[ 'person_id' => 2, ...]</p>
  
  <ol start="2">
  <li>)</li>
  </ol>
  
  <p>When I do this (because I read the cookie from a view cell): </p>
  
  <pre><code>$this-&gt;set('info', $this-&gt;request-&gt;cookie('info'));
  </code></pre>
  
  <p>I get the associative array as an string. (?) The whole array is an string: </p>
  
  <p>'.''[{"person_id":2, ... "}]''.'</p>
  
  <p>So, how can I 'avoid' this? Why does it become, via 'request', a String?</p>
  
  <p>Edit: </p>
  
  <p>In CakePHP, when you try to retrieve a cookie via 'request' (2.), you will normally get the hashed value of the cookie. When creating the cookie, I disabled the hashing. Maybe I didn't do that correctly. </p>
  
  <p>Is it also possible to unhash it in a view cell?</p>