[SOLVED] Problem getting object proprety from firebase json string

So first of all, Hello and thanks in advance.
I am setting up a database listener to update the local database if any changes were made.

This block is my try to fetch the nodes and child names it works until the last string : “AT”:“text”,“Conclusion”:“text”
i am trying to get the object from the json string and it’s property “AT” but to no avail the app just stops and no result is given

Instead of generating JSON from the object returned by the Firebase DB and then parsing that JSON, I would suggest directly accessing the data that you need from the object returned by the Firebase DB. That should greatly simplify your app.

Our documentation on objects and JSON is a bit slim (but worth reading). We also have some tutorials that might help here. It might also be worth reading up a little on JSON, if that’s what is the issue here. Perhaps one of our community members could point you to a good introduction.

I’ll also point out that you can use Cloud variables rather than the Realtime DB component to access the Firebase Realtime DB and get notified when a key changes. That might also simplify things for you.

@Mark, I really like the cloud variables, but they share info between all apps. I wish the variables could be instantiated with a username so that info in the cloud variables could be private.

For this reason, directly using the DB is better. Data security. The cloud variables are nice for personal apps or apps with limited distribution. Perhaps for a high score board or something. Like if I want to share a reminder app between me and my wife. On the other hand, to create a key for the real time data base, it is as simple as using a text log in to save user name. This allows users to store and recall information in private. This way Dad I will be stored under garage users email address which will be unique to the user

Thank you both for the response.
I would rather work with realtime db than cloud mainly for the same reason explained by @jared (also because i have no idea how).
@Mark As for your proposition to access data directly do you mean from the object like this

or get data as list and compare it to local database to get the changes?

@jared Can you give some more details about this? The implementation of Cloud variables is intended to provide the same support for security and privacy as for the Realtime DB component. If that is not the case we’d certainly like to know about it, especially if you could provide a specific example app that demonstrates it.

Yes, that’s the sort of thing that I meant.


Of course! And to be more precise, i do mean shares info across distributions. Not apps I am creating. What i would like to use firebase DB for, is parents i work with who use my data collection app. I would love to be able for each others app to update in realtime as the other parent makes a change. I want this to occur based on signing in with the same email address/username on a different device. so in essence, if parent 1 makes a mark, parent 2 will see it because they share a realtimeDB key that looks like /username/data/

right now with clouds, you cant include the username in the cloud variable name. If i can’t specify whose variable it is, how can i keep these all separated by user.

here is a very basic example. Maybe you can fill me in on how to make these private but across devices that i install this on, the same variable will show on this screen. “screen 2”


you should see the value @Mark when you open the app and click the button.

Is there a way to make the cloud variable specific to a user?

I would love to be able to set the username as part of the variable. Or if there is a firebase login being used, that whoever is logged into the app, that their login info is associated with any cloud variable in the app if the developer wanted.

on the other hand, this works for my needs but can be complicated to use sometimes Screen Shot 2020-02-11 at 3.51.45 PM