If I know that a certain data property exists on an element and it is an object, how can I store something as a new property of that data object?
For example, I have this div:
<div id="theDiv" data-test1="{string: 'test 1 data'}"></div>
And I'm trying to set data on it like this:
div.data(["test1"]["number"], 1);
But that is getting me nowhere. And div.data(["test1"]["number"]) = 1;
gets me a left-hand side in assignment error.