Data returned by Firebase are already in Thunkable object format. In principle, you can loop through the data and extract the information required but your two sets of data are not identical in format. This will cause an error resulting on the object in Thunkable becoming Null.
I think they probably are the same and that the screenshot includes a typo (a bracket in the wrong place).
@hesperussingqh Can you paste your JSON text into https://codebeautify.org/jsonviewer and make sure it appears re-formatted on the right side of the screen? If that works as valid JSON, paste it into a post here and we can help you further.
The format of the JSON is still abnormal, the userId with the code of the the user is separated by a colon but in the same time it is used as a key only not a key:value pair. It still can be used but not in a direct way.
In a journal app I’m making, here is how I structure the user data in Firebase:
users/[user_id]/DOB
Yours is formatted as:
userid:[user_id]/DOB
Creating the “users” key at the top level and having all user ids below it allows you to access the user ids as a list which is helpful for searching, etc.
I would think those blocks would work. Hmm… Does it make any difference if you remove the initialize block and instead use cloud variable “users” in place of the cloud variable users block? I would think not but that’s the only difference with my code. Do you have access to users/ in Thunkable? Because once you add sign in and authentication for Firebase, you often have to change the Firebase rules to allow access only to users/userid and not users.
For example, can you set the label’s text to get property “name” of object cloud variable “users/nbNp9KpkjaOVOQBDCZE2akJBfW02/name”? Does that work?
The get object properties block actually strips off all underlying data and therefore the resulting data set will only be the 2 user codes without anything under them. This will lead to user block failing to get the name content.