first of all I am a new student in js and not a native-english, I did some research for my problem, I found it but seriously I still can't understand at all , here the closest case for myproblem ,in fact I just realize I'm really stupid. I can't believe myself I can't understand it yet and here's my problem, I wish i can understand after this.
var obj = [
{hari:"senin", kehadiran:"masuk" , alasan:""},
{hari:"selasa", kehadiran:"masuk" , alasan:""},
{hari:"rabu", kehadiran:"absen" , alasan:"dinas keluar"},
]
//console.log(obj[1].kehadiran);
for (var prop in obj) {
console.log("hari :" + prop + " = " + obj[prop]);
}
I have this Object and simply want to change it to be like this :
Hari: senin
Kehadiran: masuk
Hari: rabu
Kehadiran: masuk
Hari: jumat
Kehadiran: absen
Alasan: dinas luar
yet I think my problem maybe because I do not fully understand iterate for...key or something like that and is this looks like array-dimensional ? if you could give me link or reference from what I'm lacking in this problem so I can point out and master it. I'm sorry for asking a simple question like this but I just really confused.