title: LocalStorage of JSON not working Jquery
body: <p>I have a JSON array in Jquery that I am trying to save to localStorage for later use, but for some reason, whenever I try and save it, it comes up with an error that the object is not defined. Here is my current code:</p>
  
  <pre><code>localStorage.setItem("Jsonobject", JSON.stringify(json));
  
          var jsonobject = JSON.parse(localStorage.getItem(Jsonobject));
  </code></pre>
  
  <p>The error specifically states "Jsonobject is not defined" even though I just defined it in the line above. I have tried "Jsonobject" with single and double quotes and they both come up with the same error. I have followed the instructions on this page, <a href="https://www.smashingmagazine.com/2010/10/local-storage-and-how-to-use-it/" rel="nofollow noreferrer">https://www.smashingmagazine.com/2010/10/local-storage-and-how-to-use-it/</a>, but it doesn't seem to be working for some reason.</p>