How to store (and retrieve) a cookie array with Angular cookies
try like that:
DemoApp.controller('DemoController', function ($cookies, $scope, $log) { //$cookies.put('myCookieArray',{'key1':'value1','key2':'value2'}); $cookies['myCookieArray']= {'key1':'value1','key2':'value2'}; getmycookiesback = $cookies['myCookieArray']; $log.info(getmycookiesback.key1); })
here the plunker: http://plnkr.co/edit/k9fltjGUbTbfbVlAmRcJ
I hope it helps