[ad_1]
I need to pass the data retrieved from Firebase to the “eventos” object array, I’m a beginner, how’s the easiest way to do that?
var ref:DatabaseReference?
var databaseHandle:DatabaseHandle?
var eventos = [Evento]()
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate = self
tableView.dataSource = self
let ref = Database.database().reference(withPath: "Eventos")
ref.observe(.value, with: { snapshot in
// This is the snapshot of the data at the moment in the Firebase database
print(snapshot.value as Any)
})
[ad_2]