How to Store Dictionary Data in Firebase Correctly?

I’m using dictionary to store data in my project. it stores like in the image at first when store value is fired.
image

when I press enter, it gets converted automatically to nice tree.

But I want it to store in nice tree automatically, why do I need to manually go to data and press enter.

If you use dict, it wont parse each key as separate tag. But while export it as json you will get it as dic

Try this web method of posting data

Source : METRIC RAT AI2 - Firebase with a Web Component

1 Like

Maybe this can help too,


Let’s start with the basics

It’s not exactly what you’re asking for, but it contains some useful information about lists


Put data at tag e.g.1

Put data at tag e.g.2

1 Like

Thanks, I think I do not have any option apart from this. I’ll try and then mark it as a solution once my data is correctly visible in firebase.

Don’t worry firebase already contains structured data, what you are seeing is a single line but other apps and the kodular read it as a tree only okay. This single line is not going to effect the app performance at all and you can retrieve dictionary with no problem. Its Firebase… So better ignore it and focus on the build.

no, this is incorrect. Kodular is not able to read the data if stored in this way. I’ve been trying from morning hence I asked in the forum. I also thought initially that it will work but guess what it didn’t.
So have to move to use the web component and TBH i’m enjoying it.

Yes, using the WEB component. I can see the data is being stored as a nice tree and have no issue reading it back in kodular.

1 Like

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