title: JS: Multiple objects in an array stored in local storage
body: <p>I've been trying to do this all day and just can't get it right. I've read many articles on various websites and tried many different approaches, but I am still getting issues of one kind or another.</p>
  
  <p>Sorry if it's a little haphazard, I'm struggling to see my issue and so I'm struggling on what area to ask for help.</p>
  
  <p><strong>Component aim:</strong> Array stored on LS that holds objects, that hold information on shows
  <strong>Component issue:</strong> Depending on the code I seem to either be overwritting a single object, cant log more than 2 objects (that then overwrite each other) or after storing 1 object fine the array starts messing up with more entries.</p>
  
  <p>TLDR:</p>
  
  <p>All I'm trying to do at this point is:</p>
  
  <p>-push new object onto new showList array</p>
  
  <p>-pull my objects from a showList array in LS (if exists), push into new showList</p>
  
  <p>-stringify, then push my new combine array into LS</p>
  
  <p>Below is the relative function.</p>
  
  <pre><code>function addNewShow(titleArg, typeArg, genreArg, watchedArg) {
    var showList = [];
  
    var show = {
      title: titleArg,
      type: typeArg,
      genre: genreArg,
      watched: watchedArg
    };
    showList.push(show);
    showList.push(JSON.parse(localStorage.getItem('showList')));
    console.log(showList);
  
  
    localStorage.setItem("showList", JSON.stringify(showList));
  };
  </code></pre>
  
  <p>If you'd prefer to see the project you can see that here: <a href="https://codepen.io/11PH/pen/NONJBa?editors=1011" rel="nofollow noreferrer">https://codepen.io/11PH/pen/NONJBa?editors=1011</a></p>
  
  <p>Any help much appreciated, thank you in advance.</p>