# Nodes global variables

**URL:** <https://discourse.nodered.org/t/nodes-global-variables/39243>\
**Category:** General\
**Created:** [16 January 2021 21:43 UTC](https://discourse.nodered.org/t/nodes-global-variables/39243 "2021-01-16T21:43:17Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 January 2021 17:25 UTC](https://discourse.nodered.org/t/nodes-global-variables/39243/29 "2021-01-25T17:25:03Z")

</div>

Was missing the `e.` (code was untested)

```auto
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;
}

```

---

_[View the full topic](https://discourse.nodered.org/t/nodes-global-variables/39243)._
