I’m having a tough time getting the value of a key in the data attribute. I’m using the jquery metadata plugin.
jQuery:
jQuery.metadata.setType("attr", "data");
$('ul li').each(function () {
console.log($(this).metadata())
});
HTML
<ul>
<li data="{someKey:'someValue',anotherKey:'anotherValue'}">Some List Item</li>
<li data="{someKey:'someValue2',anotherKey:'anotherValue2'}">Some List Item 2</li>
<li data="{someKey:'someValue3',anotherKey:'anotherValue3'}">Some List Item 3</li>
</ul>
I am outputting the object, but have no idea how to get at the value. I’ve tried $(this).metadata().someKey and $(this).metadata('someKey') and now I am grasping for straws.

Looks like you want this:
Then you can access
myMeta.someKeyormyMeta.anotherKey– whatever meta keys you have set.