# How do i address this object?

**URL:** https://discourse.nodered.org/t/how-do-i-address-this-object/35610
**Category:** General
**Created:** [9 November 2020 15:02 UTC](https://discourse.nodered.org/t/how-do-i-address-this-object/35610 "2020-11-09T15:02:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Toontje](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/toontje/32/31667_2.png) [@Toontje](https://discourse.nodered.org/u/Toontje)
#### Post date: [9 November 2020 15:02 UTC](https://discourse.nodered.org/t/how-do-i-address-this-object/35610/1 "2020-11-09T15:02:49Z")

</div>

![Screenshot 2020-11-09 at 13.28.03](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/4/34fed30189f06f90b7cedf370a92ee9b79783ec3.png)

I want to parse the number of these objects in my function node. How do i address these objects?

---

<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: [9 November 2020 15:12 UTC](https://discourse.nodered.org/t/how-do-i-address-this-object/35610/2 "2020-11-09T15:12:09Z")

</div>

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

> **[Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)**

Short version - use the copy path button that appears under your mouse when you hover over it.

---

<div class="post-metadata">

### Author: ![Toontje](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/toontje/32/31667_2.png) [@Toontje](https://discourse.nodered.org/u/Toontje)
#### Post date: [9 November 2020 15:25 UTC](https://discourse.nodered.org/t/how-do-i-address-this-object/35610/3 "2020-11-09T15:25:36Z")

</div>

Sure. That gives me payload.tagData["1030408400079025AA86028108F3292D"] Issue here is that the number 1030408400079025AA86028108F3292D is fairly random and therefor cannot be used in the function node.  
For example, if i want to add a node to the JSON structure that contains this value, how would i do that?

---

<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: [9 November 2020 15:30 UTC](https://discourse.nodered.org/t/how-do-i-address-this-object/35610/4 "2020-11-09T15:30:11Z")

</div>

If these change you will have to scan the keys of the `tagData` object.

Look into using `Object.keys(msg.payload.tagData)` then iterate through the keys.

Or [look at this thread](https://stackoverflow.com/questions/14379274/how-to-iterate-over-a-javascript-object) for ideas

---

<div class="post-metadata">

### Author: ![Toontje](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/toontje/32/31667_2.png) [@Toontje](https://discourse.nodered.org/u/Toontje)
#### Post date: [9 November 2020 15:32 UTC](https://discourse.nodered.org/t/how-do-i-address-this-object/35610/5 "2020-11-09T15:32:59Z")

</div>

That looks like what i am looking for. Thanks!!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [23 November 2020 15:33 UTC](https://discourse.nodered.org/t/how-do-i-address-this-object/35610/6 "2020-11-23T15:33:02Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
