title: How to store and retrieve JSON data into local storage?
body: <p>I have this code:</p>
  
  <pre><code>var string = '{"items":[{"Desc":"Item1"},{"Desc":"Item2"}]}';
  localStorage.setItem('added-items', JSON.stringify(string));
  </code></pre>
  
  <p>This code will use localStorage.</p>
  
  <p>Here is now the code to get the stored data:</p>
  
  <pre><code>var retrievedObject = localStorage.getItem('added-items');
  </code></pre>
  
  <p>My problem now is, how can i get the size of the data items? answer must be 2.</p>
  
  <p>How can i get the "Item1" and "Item2"?</p>
  
  <p>I tried <code>retrievedObject[0][0]</code> but it is not working.</p>
  
  <p>And how to add data on it? 
  so it will be </p>
  
  <pre><code>{"items":[{"Desc":"Item1"},{"Desc":"Item2"},{"Desc":"Item3"}]}
  </code></pre>
  
  <p>Can I use <code>JSON.stringify</code>?</p>