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

115
Views
how to retrieve spesific value on local storage with jquery

can someone help me to get spesific value of the local storage (ex: "name" : "budi" and "name" : "andrew"), i just only get the "andrew" name

aa = JSON.parse(localStorage.getItem("a"))
//$('#isinama').text('Welcome ' + aa)

var data_user1 = JSON.parse(localStorage.getItem('data_user'))

for (var i in data_user1) {
  var entry = data_user1[i]
}

if (aa == entry.username) {
  $.each(entry2, function(i, data) {
    $('#listcurhat').append('<div class="card mb-3" style="max-width:24rem;"><div class="card-header" id="isinama2">' + aa + '</div><div class="card-body"><p class="card-text">' + data.textcurhat + '</p></div></div>')
  })
}

in this condition, 'aa' have a spesific value because i was looping and return value above on it, can help spesific value for 'entry.username' cause i have many username on data_user localstorage

enter image description here

example of my localstorage

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!