I am using Firebase
as my Database...
Then i want to delete the "codigo"
key value. This is my if statement:
let profile = FIRDatabase.database().reference().child("barcodes")
profile.observeEventType(.Value, withBlock: { (snapshot) -> Void in
for item in snapshot.children {
if item.value["codigo"]as! String == barcodes[indexPath.row].code{
print("HERE")
item.removeValue!()
}
}
but it crashes at item.removeValue()
.