title: Chrome.storage appending values to an object
body: <p>I have the following block of code that's behaving unexpectedly:</p>
  
  <pre><code>//Where url and info are strings
  function addURL(url, info){
      chrome.storage.sync.get("data", function(items) {
          items[url] = info;
  
          chrome.storage.sync.set({"data" : items}, function() {});
      }); 
  }
  </code></pre>
  
  <p>My goal is to take the "data" key value pair out of storage, add a new index to that object with the key of url and the value of minutes, and then replace the previous 'data' value with the new one.</p>
  
  <p>Instead, I'm creating a nested structure where this code executes correctly the first time through, but on subsequent adds there become nested "data" blocks inside the object as follows:</p>
  
  <pre><code>data
    url3 -&gt; info3
    data
      url2 -&gt; info2
          data
          url1 -&gt; info1
  </code></pre>
  
  <p>While what I would expect is</p>
  
  <pre><code>data
      url1 -&gt; info1
      url2 -&gt; info2
      url3 -&gt; info3
  </code></pre>