I've got the following array:
Object { id: "1", name: "a", hour: "08:00:00" }
Object { id: "2", name: "b", hour: "08:00:00" }
Object { id: "3", name: "c", hour: "08:00:00" }
Object { id: "4", name: "d", hour: "07:15:00" }
Object { id: "5", name: "e", hour: "08:00:00" }
Object { id: "6", name: "f", hour: "08:00:00" }
Object { id: "7", name: "g", hour: "09:00:00" }
Object { id: "8", name: "h", hour: "08:30:00" }
And when I try to access the "hour" value by:
for(i = 0; i < array.length; i++){
var hour = array[i]['hour'];
console.log(hour);
}
I get the following result:
08:00:00 (3 repeats)
07:15:00
08:00:00 (2 repeats)
09:00:00
08:30:00
How can I avoid that and get:
08:00:00
08:00:00
08:00:00
07:15:00
08:00:00
08:00:00
09:00:00
08:30:00