Get and Set sessionStorage - Javascript

Get and Set sessionStorage - Javascript

code snippet

javascript
function setObj(obj, name) {
    var jsonStr = JSON.stringify(obj);
    sessionStorage.setItem(name, jsonStr);
}
function getObj() {
    var jsonObj = sessionStorage.getItem(name);
    return JSON.parse(jsonObj);
}

"The secret of getting ahead is getting started"

Contact me!

Have questions? Feel free to use the form or send me an email with any questions.

I will be responsive to your requests and your questions.