The scripting language supports looping over the properties of an object by using the following syntax:
for( var p in alarm.properties ) writeln( p + '=' + alarm[p] )