I have an application where a user can create lists.
The user can share a list with other users. I already manage to create the sharing part, the one I\'m having i
There is no way to do a server-side delete of multiple items based on a condition with the Firebase Database. You must first retrieve the items (or just their IDs) matching the condition and then delete those.
However, you can delete the list itself and all references to it in one go by using a multi-path update.
I'd also recommend keeping a list of all the UIDs you've shared a specific list with, so that you don't have to loop over all users. Keeping many-to-many relations in both directions is quite common in Firebase and other NoSQL databases.
For more see: