Szymon
 · FlutterFlow Expert/Partner

Documents Merge in Firebase

Hi,
I am looking for a solution to merge documents on firebase.

Case:
Each time I create a new entry in the database with the following content:

- User/player name (it is not a registered user in the app, but the person's nickname entered manually as a string)
- Number of points scored (double)

Every time I add a new document to Firebase, I have the name and number of points gained

I'm looking for a solution to merge the names of the same string in the database and add up the points they score
e.g. I have:
- Jack, 148 points
- Simon, 23 points
- Jack, 40 points

I want it to display in the results column:
- Jack, 188 points
- Simon, 40 points

Does anyone have an idea for this? Maybe some other solution? Maybe using Cloud Function in firebase will be a good idea and will allow this type of operations? Maybe it's better to use some other API backend?

1
1 reply