This is royally annoying me at the moment:
Consider an array of 2 values:
var myArray = new Array();
myArray.push(21031);
myArray.push(21486);
When storing this in a cookie using jquery and toJSON, the value of the cookie looks like this:
["21031","21486"]
Now consider an array of a single value:
var myArray = new Array();
myArray.push(21239);
When storing this in a cookie using jquery and toJSON, the value of the cookie looks like this:
21239
This is almost completely useless to me as when I pull the items from the cookie, one comes back as a single value, the other comes back as an array that I can iterate over....ahhh!
Why?