I am a novice in JavaScript and I just need some help for a project that requires JavaScript. I need to store Json objects in the browser.
How would I store a Json object in local storage of a browser?
Also, how would I retrieve it?
Here is what I have right now:
//Json object
var obj{
"name":"Quandale Dingle",
"age":24,
"team":"Seahawks"
}
//Storing it in local storage
localStorage.setItem(obj);
I checked my console for the getItem, and I would not get any result.