How to get Expess object cookie in angularJS?
问题 Express documentation says that we can set a cookie with an object using this function: res.cookie('cart', { items: [1,2,3] }); I want to retrieve this value using Angular ngCookie: var cart= $cookies.getObject('cart'); But it throw an error: SyntaxError: Unexpected token j I can retrieve the string value of the cookie using $cookie.get('cart') , and, indeed, it looks like this: j:{ "items": [1,2,3] } I know I can remove the characters and then parse the object, but I'd rather have a more