How do I nest objects with variable values?


sorry but I need your help. I searched and tried for hours and don’t get it (if it’s even possible?!)

I just want to nest my objects whose are getting saved into firbase with a variable name…

I want to have a directornary in my database like this: User → [USER_EMAIL] → Properties…

This is my code:

And I know it work like this:

But HOW did I get the object field [USER_EMAIL] filled with the users email address, the input email value?

It is unfortunately not possible to connect a block into this field… just static text

Can someone help me out here?

When working with Firebase, you need to use cloud variables:

set cloud variable [path to user email] to create object with fields Profilbild, etc.

The path to the user email is usually something like /users/userid/email_address where userid is the value from the sign in block.

Hi tatiang,

thanks for your fast reply.

I know about the cloud variable and I already had this before and the app variable is only there because I had tried something and forgot to set it back to cloud.

My question/problem is still how do I get each individual userID or email_address into the Users section?

What block structure do I need to build to organize this?

For now it is getting saved in firebase as: [USERS_EMAIL_ADDRESS] → Properties…

But what I need to do that I get the directonary: Users → [USERS_EMAIL_ADDRESS] → Properties…

Ok I found it out… sorry I’m new and didn’t know that I can use the “join” block to make it work

It looks like this:

Topic closed

1 Like