Upon the tap of a delete button. I am trying to delete a particular child out of my Firebase database. My problem is that I am unable to refer to the particular childByAut
Let's start with a simplified structure
-Uiiasidasod
item_name: "iMac"
-Yiimamsmdd
item_name: "MacBook"
A typical design pattern is to read these items from Firebase and store them in an array of dictionaries. That array is used as a datasource for the tableViews.
each dictionary is a key:value pair.
So the first node from above has a Firebase key (parent node name of "Uiiasidasod" and a value of "item_name: iMac" (note the value is a dictionary as well)
myArray[0] = ["Uiiasidasod": "item_name: 'iMac'"]
myArray[1] = ["Yiimamsmdd": "item_name: 'MacBook'"]
so when the user swipes row 1 in the table, you fetch the dictionary from the array, row 1. You get the key portion (the Firebase node name) and can then delete it from Firebase.