# Get firebase auto-generated ID via msg.payload

**URL:** <https://discourse.nodered.org/t/get-firebase-auto-generated-id-via-msg-payload/9765>\
**Category:** General\
**Created:** [4 April 2019 10:19 UTC](https://discourse.nodered.org/t/get-firebase-auto-generated-id-via-msg-payload/9765 "2019-04-04T10:19:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![heliocosta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/heliocosta/32/9572_2.png) [@heliocosta](https://discourse.nodered.org/u/heliocosta)\
**Post date:** [4 April 2019 10:19 UTC](https://discourse.nodered.org/t/get-firebase-auto-generated-id-via-msg-payload/9765/1 "2019-04-04T10:19:05Z")

</div>

Hi there,

I've worked with Firebase as my database and user authentication. For my project, it's necessary to use the auto-generated ID from firebase.

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

I've tried with no success to get the id via msg.payload.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/a4078db1a37bea019e5a37f12a685d13170a8e23.png)

How can I get this value dynamically?  
Any of these commands have worked: msg.payload.id, msg.payload.name, msg.payload[0], , msg.payload[1].

The only way it works is if I use something like: msg.payload["-Lbbm6AVDzjcHbx1cyZT"]. However, it's not a dynamic approach.

In a nutshell, I just need to get this value "-Lbbm6AVDzjcHbx1cyZT" and use it afterwards.

Thanks,  
Helio

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 April 2019 10:23 UTC](https://discourse.nodered.org/t/get-firebase-auto-generated-id-via-msg-payload/9765/2 "2019-04-04T10:23:23Z")

</div>

see [https://stackoverflow.com/questions/4260308/getting-the-objects-property-name](https://stackoverflow.com/questions/4260308/getting-the-objects-property-name)
