I have these arrays that I want to display in a tableView:
private var firOrder = [String]()
private var firDate = [Int]() 
I try to get and append the data like this:
override func viewDidLoad() {
    ref = Database.database().reference() ref?.child("users").child(user).child("Orders").observe(.value, with: { (snapshot) in
        let values = snapshot.value as? [String: AnyObject]
        let order = values!["Order"] as! String
        let date = values!["Date"] as! Int
        print("order \(order)") //This prints correctly
        print("date \(date)")  //This prints correctly
        self.firOrder.append(order)   
        self.firDate.append(date)
    })
    print(firOrder) //This prints empty and does not append to array.   
    print(firDate) //This prints empty and does not append to array
}