SessionStorage and json objects
<pre><code>user: {firstName: "loki", lastName: "ch"}
</code></pre>

<p>I am storing this user in session storage. </p>

<pre><code>$window.sessionStorage.user = user;
</code></pre>

<p>when i retrieved it back using
 <code>$window.sessionStorage.user</code>, i got:</p>

<pre><code>[object Object] 
</code></pre>

<p>I want in JSON.
Any suggestions?</p>