var p = {
0: "value1",
"b": "value2",
key: "value3"
};
for (var key of Object.keys(p)) {
console.log(key + " -> " + p[key])
}
var arr = [ {"id":"10", "class": "child-of-9"}, {"id":"11", "class": "child-of-10"}];
for (var i = 0; i < arr.length; i++){
document.write("<br><br>array index: " + i);
var obj = arr[i];
for (var key in obj){
var value = obj[key];
document.write("<br> - " + key + ": " + value);
}
}
var elements = document.querySelectorAll("a");
for (var i=0; i<elements.length; i++) {
elements[i].style.color = "red";
}
for (var key in data) {
if (data.hasOwnProperty(key)) {
alert(data[key].id);
}
}