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
example of my localstorage