Was missing the e.
(code was untested)
var oldDevices = msg.payload.old;
if(oldDevices && oldDevices.length) {
msg.payload = `Found ${oldDevices.length} devices with wrong version...\n` + msg.payload.old.map(e => `NAME: ${e.name}, IP: ${e.ipAddress}, VER: ${e.version}`).join("\n")
return msg;
}