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

155
Views
How can I reach a property of an object in localStorage

I have that problem: I'm trying to reach the property of on object "user" that I save in localStorage and the browser gives me the error "Cannot read properties of undefined". I apply my code

 like(recipe) {
        if (this.favorites.indexOf(recipe) === -1) {
            this.favorites.push(recipe)
        }
        let user = JSON.parse(localStorage.getItem("users"));
        let currFav = user.favorites;
        currFav.push(recipe);
        localStorage.setItem("users", JSON.stringify(user))
    }

about 4 years ago · Juan Pablo Isaza
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!