2
Doubt: I would like to know a way to use a Cookie
, as if it were a Array
.
Problem: I can’t imagine how to do that.
Example: Suppose I have one Array
called Foo
which would be as follows:
var Foo = ["qualquer coisa, que esteja|escrito-simbolos*e_outros","qualquer coisa, que esteja|escrito-simbolos*e_outros"];
And I’d like to store this information in a Cookie
called FooArray
, and then I could redeem the value of Cookie
and use as a Array
.
How could it be done?
Exactly what I thought when I opened the question, the biggest advantage over the other answer is that you might have commas inside the strings.
– Fabrício Matté
This is really a great solution, since I’m a fan of JSON, I don’t know how I didn’t think of it before! :)
– Paulo Roberto Rosa