My firebase real time database structure looks like this:
"aHB1ASJ895Adsws2": { // User id
"lat": "48.023288102" // Users lat
"lng": "-122.3324202" // and lng values
Before adding another of these to the parent node I would like to delete all nodes that have the current users id.
For example, if the current user id is 123 and there are 2 nodes which have a user id value of 123 then these nodes should be deleted before adding a new location for the current user into the firebase real time database.
How can I remove nodes with the same user id as the current user with the firebase real time database?