What is the problem with the existing method? expectedAlarms is an object not an array so I can't do expectedAlarms.forEach but I could do Object.keys(expectedAlarms).forEach.