json - JQuery - Serialize cookie string value to object/array type -
im using jquery.cookies.2.2.0.js in retrieving cookie values:
$cookie = $.cookies.get('ci_session'); //generates a:5:{s:10:"session_id";s:32:"46645fe9eb70e1b157f24b724932be24";s:10:"ip_address";s:9:"127.0.0.1";s:10:"user_agent";s:50:"mozilla/5.0+(windows;+u;+windows+nt+6.1;+en-us;+rv";s:13:"last_activity";s:10:"1298530444";s:15:"promos_userinfo";a:1:{s:8:"username";s:9:"requester";}}c53a500fb3108c3930da58d50b6db036
my problem how convert string object type or array type. have tried parse using json.parse() there error. please how use json.parse or method can parse string.
you can use version of php's unserialize()
ported javascript.
Comments
Post a Comment