# Access Name of Message Object

**URL:** <https://discourse.nodered.org/t/access-name-of-message-object/30213>\
**Category:** General\
**Created:** [16 July 2020 15:29 UTC](https://discourse.nodered.org/t/access-name-of-message-object/30213 "2020-07-16T15:29:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stokes776](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stokes776/32/66036_2.png) [@stokes776](https://discourse.nodered.org/u/stokes776)\
**Post date:** [16 July 2020 15:29 UTC](https://discourse.nodered.org/t/access-name-of-message-object/30213/1 "2020-07-16T15:29:20Z")

</div>

Hello,  
I have a message, where the Object Name is dynamic. I would like to extract that and re-form the message a bit. I cant figure out how to access the name of the object. Ive tried msg.payload.\* but that gives me back everything within the object. I've tried msg.payload.value but that doesnt seem to do the trick either.

Ive figured out that I can to a msg.payload.\*.rms\_x and I get the value, but I still need to somehow get that Object name, that 00:13:A2:00:41:BA:6B:25 and insert it as a value into the object.

Can anyone please give me a hint on how to access that Object name?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c3b6373d0c6f652c88caf18a0dd0223acda3fbf3.png)

---

<div class="post-metadata">

**Author:** ![stokes776](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stokes776/32/66036_2.png) [@stokes776](https://discourse.nodered.org/u/stokes776)\
**Post date:** [16 July 2020 15:40 UTC](https://discourse.nodered.org/t/access-name-of-message-object/30213/2 "2020-07-16T15:40:35Z")

</div>

I think I found a way. If I pass the message into a Change block, and set a new msg.SensorID to a JSONATA of `$keys($.payload)` I get the value into that field.

---

<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:** [30 July 2020 15:40 UTC](https://discourse.nodered.org/t/access-name-of-message-object/30213/3 "2020-07-30T15:40:44Z")

</div>

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