# Get node instance via RED.nodes.getNode

**URL:** <https://discourse.nodered.org/t/get-node-instance-via-red-nodes-getnode/9611>\
**Category:** Developing Nodes\
**Created:** [30 March 2019 14:04 UTC](https://discourse.nodered.org/t/get-node-instance-via-red-nodes-getnode/9611 "2019-03-30T14:04:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [30 March 2019 21:06 UTC](https://discourse.nodered.org/t/get-node-instance-via-red-nodes-getnode/9611/4 "2019-03-30T21:06:27Z")

</div>

> [@drmibell](#):
>
> What happens if you define a proper node context variable and do the standard get/modify/set sequence

Hey Mike (@drmibell), normally I would do it like that but I was experimenting for a new [contribution](https://discourse.nodered.org/t/analyse-node-red-memory-usage/5668/5) that determines the memory usage of selected nodes. If a function node stores it's data on **'this'** , then the size of that data should also become visible via the new contribution. But it doesn't at the moment 🥴

> [@dceejay](#):
>
> the function runs in a sandbox - so the "this" refers to the inside of the sandbox.

Hi Dave (@dceejay), that indeed makes sense. But that suddenly turns a function node already into an exception, when I want to determine the memory size of each node. Damn that makes it again more complex, especially since there are other nodes that use sandboxes. I assume there is no easy way to get hold of the sandbox and its data ...

---

_[View the full topic](https://discourse.nodered.org/t/get-node-instance-via-red-nodes-getnode/9611)._
