Use dot notation and/or bracket notation to access object properties and for
loops to iterate arrays:
var d, i;
for (i = 0; i < dictionary.data.length; i++) {
d = dictionary.data[i];
alert(d.id + ' ' + d.name);
}
You can also iterate arrays using for
..in
loops; however, properties added to Array.prototype
may show through, and you may not necessarily get array elements in their correct order, or even in any consistent order.