Hi,
Is it possible to store arrays using cc.sys.localStorage?
I can only find sample with key, value pairs…
Thanks in advance.
Hi,
Is it possible to store arrays using cc.sys.localStorage?
I can only find sample with key, value pairs…
Thanks in advance.
You could use JSON.stringify(myObject) to turn an object - such as an array - into a string and use that as the value of the key-value pair. Then use JSON.parse(myString) to turn the value back into an object again when you need to.
Great! Thanks!