title: Display JSON Object held in Localstorage
body: <p>I am trying to retrieve a JSON object from localstorage in the web browser, and then display the values. I am able to save the JSON object, and push/ append new data to it. I am having difficulties figuring out the logic needed to retrieve and display it. To give a little background, variable "S" is a number that always changes. Time, is the time that the click (main function) happened. I want these two things paired together. </p>
  
  <pre><code>EX. I would like to print:
  123456 - Time: 2:04
  54321 - Time : 3:15
  </code></pre>
  
  <p>Here is how I am saving, and pushing/appending:</p>
  
  <pre><code>$("#oico").click(function() {
  var S = window.localStorage.getItem("_snum");
  var myDate = new Date();
  var theDate = (myDate.getMonth()+1) + '.' + (myDate.getDate()) + '.' +     myDate.getFullYear();
  var today = new Date();
  var h = today.getHours();
  var m = today.getMinutes();
  var s = today.getSeconds();
  var time = h + ":" + m + ":" + s;
  var obj = {};
  obj[S] = time;
  if (window.localStorage.getItem("_obj") === null) {
  window.localStorage.setItem("_obj", JSON.stringify(obj));
  } else {
      var existingEntries = JSON.parse(window.localStorage.getItem("_obj")) || [];;
      entry[S] = time;
      window.localStorage.setItem("entry", JSON.stringify(entry));
      // Save allEntries back to local storage
      existingEntries.push(entry);
      window.localStorage.setItem("_obj", JSON.stringify(existingEntries));
  }
  });
  </code></pre>
  
  <p>I am trying to figure out a way to print a list of all S properties in the object "_obj". However, since S is not a constant value/key, I can't figure out how to print all "S" properties in a list with their respective time values. I know my logic on how this is constructed is probably flawed, which is why I would like assistance.</p>