I am saving from PHP some data in assoc array. There are some Id's putted in an array and then json_encoded:
$ids = array(id => id, id2 => id2);
json_encode($ids);
store in the cookie ...
I am using this plugin for jQuery: http://plugins.jquery.com/cookie/
This is the string, what is stored in the cookie with value: "xxx"
%7B%2222504454%22%3A22504454%7D
path: "/"
domain: ".domain.com"
When I use this one:
var test = $.cookie( 'xxx');
I am receiving only Object as return.
How to read this array?
JSON.parse()or$.parseJSON()