JQuery data() call
<p>Could anyone explain the difference between this:</p>

<p>Update 1- reverting phrases</p>

<pre><code>container.data("state", { test: 1 }); // works
</code></pre>

<p>and this:</p>

<pre><code> container.data["state"] = { test: 1 }; // doesn't work
</code></pre>

<p>I found that the first construction works, while the last one doesn't. The call populates container with the initial data, i.e. "state" is blank when it's called.</p>
