How to write to the last child of a Firebase ref in Swift?
问题 I am struggling with writing data to Firebase in the desired way. The situation: I want to store multiple "trips" for each user. Every "trip" contains locations with lat, long, altitude and a timestamp. On certain conditions, I want to add a new location to the most recent "trip". Data Structure is the following: - root -- users --- userID ---- trips ------ trip1 ------- location ------ trip2 ------- location What would be the best way to add locations to the most recent trip (trip2 in this