I am attempting to store an array in the HTML data tag. For example:
<div data-locs="{'name':'London','url':'/lon/'},{'name':'Leeds','url':'/lds'}">
I am accessing that data using jQuery. I realise that this is stored as a string, and I've tried various methods to convert it to an array, but I've hit a wall. If you take a look at this jsFiddle page you'll see a full example of what I'm trying to do.
Any ideas?
Thanks!