What\'s the best way to store this:
var mydata = [{\'11 Alveston Road, Manchester\':1},
{\'12 Plymouth Street, Liverpool\':2}];
This sounds like a job for JSON.stringify:
var myData = JSON.stringify(
[
{'11 Alveston Road, Manchester':1},
{'12 Plymouth Street, Liverpool':2}
]
); // "[{"11 Alveston Road, Manchester":1},{"12 Plymouth Street, Liverpool":2}]"
The array is converted into a string in JSON format, which you can then use as the value of your cookie. You can decode it with JSON.parse.
Note: since you are using mobile browsers, they're probably quite modern and so have JSON natively installed. You can use this library to work around this in these cases.