Im attempting to store json objects in a cookie, but im running into a few problems.
I can create my object like this:
product = {
name : prodname,
quantity : 4
}
i then save this object in my cookie. As more products are added (its a shopping basket) i add further strings by appending new objects onto the end of the cookie string (so i essentially have lots of small seperate objects) . Im having trouble getting the objects back out of the cookie string though. Both $.parseJSON
and eval
fail when i attempt to read the objects back from the cookie. Any help would be appreciated.