Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
unable to store object in session Storage

enter image description here

In this image you can see I am getting an array of objects and at Zero position I am getting some objects Now my task is to store these objects in sessionStorage.

sessionStorage.setItem("mytime",JSON.stringify(data[0]));

When I am checking in sessionStorageis showing an Empty object.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There is a difference b/w sessionStorage and localStorage.

The sessionStorage is available only for that particular session i.e if a browser is reloaded, you will no longer be able to access the data. However, localStorage is persistent and will be available until you explicitly remove it.

If the value is empty, you need to check the value of data[0].

localStorage.setItem('mytest', 'Check the local storage console');
console.log(localStorage.getItem('mytest'));
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!