Can an object be converted to a string, stored in a cookie, retrieved, and then parsed back to its original form when the user logs on again?
Here's a concise example of what I'm asking:
var myObject = {
prop1: "hello",
prop2: 42
};
var jsonString = JSON.stringify(myObject);
createCookie("myObject", jsonString);
var savedObject = JSON.parse(readCookie("myObject"));
myObject = savedObject;
If this is achievable, is it feasible to store each property/value pair separately?
Appreciate your help!