Reputation: 33
Hello I have The Following Problem, I want to save my data to my realtime Database so, that I can use it as a list.
so know I am trying to save the PartyId (yellow) with a uuid (red), but this is not really working, because I need the uuid to use it on swift.
So are there probably any other ways to save or read the data.
Thanks in advance.
Upvotes: 0
Views: 377
Reputation: 166
If you only need to store the data in an array, you need to add the index of the element as a key, and the PartyId as the value.
This make the "Array" element to be able to be treated as an array when you retrieve the data.
Just to be mentioned, if you need to make some queries when you retrieve the data (for example, how many users assist to a specific party) consider to flatten your structure data like this:
With this you can be able to query, for example, all the users that have a specific partyId. For more information, you can check the documentation to create good data structures
Upvotes: 1