This would be simpler just using a regular for-each loop I think:
for (var name in alarms) {
  if (alarms.hasOwnProperty(name) {
    var alarm = alarms[name];
   ...