In JS the recommended way is actually:
Object.keys(data).forEach(function (property) {

To avoid the other way of

for (var i in result.data) {
  if (result.data.hasOwnProperty(i) {
    do things
  } 
}