title: How to save multiple objects to an array in a chrome extension?
body: <p>I'm building my first chrome extension and I want it to track the TV series I watch and I'm currently trying to get it to save metadata on the series that I am following.</p>
  
  <p>I have a content script that returns the title, the newest episode (and the URL of this episode) as well as the URL of the cover image of the series. I am currently trying to save it with some code on my background script (I have made sure to include "storage" under the permissions section of the manifest file).</p>
  
  <p>So far my script looks like this (This was developed with help from <a href="https://stackoverflow.com/questions/32089840/trying-to-save-and-fetch-a-javascript-object-using-chrome-storage-api/32091180#32091180">Trying to save and fetch a Javascript object using chrome.storage API?</a>):</p>
  
  <pre><code>var bkg = chrome.extension.getBackgroundPage();
  response.aID = new Series(response.aTitle,response.aNewEp,response.aNewEpURL,response.aImage);
  
                  chrome.storage.sync.set(response.aID, function(){
                      chrome.storage.sync.get(function(val){
                          bkg.console.log("The saved title is: ", val.anTitle);
                          bkg.console.log("The saved newEp is: ", val.anNewEp);
                          bkg.console.log("The saved newEpURL is: ", val.anNewEpURL);
                          bkg.console.log("The saved imageURL is: ", val.anImage);
                      });
                  });
  </code></pre>
  
  <p>Problem is, the script only seems to store one <code>response.aID</code> at a time, so I can never store data for more than 1 TV series. Every time I try, the script seems to overwrite my previous entry. So I would like to ask whether there's any way to store more than 1 TV series at a time?</p>
  
  <p>I have looked at storing an array and then pushing each new object into that array (<a href="https://stackoverflow.com/questions/16605706/store-an-array-with-chrome-storage-local">Store an array with chrome.storage.local</a>), but I don't quite understand the syntax involved so I'm not sure if this would work for me.</p>