title: want to fetch data from firebase
body: <p>I can fetch all data but don't know how to go inside the nodes
  and fetch values. Here is the structure of my database want to fetch all data</p>
  
  <p><a href="https://i.stack.imgur.com/S1O7k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S1O7k.png" alt="enter image description here"></a></p>
  
  <pre><code>func fetchData(){
      ref = Database.database().reference()
      let userid = Auth.auth().currentUser?.uid
  
      ref.child(Constants.NODE_MAINTENANCE).child(userid!).child(Constants.NODE_MAINTENANCE_DATE).child(self.lastMaintenanceDateLbl.text ?? "").observe(DataEventType.value) { (snap) in
  
  
  
          guard snap.exists()
              else {
                  print("no data found at this date")
                  AppUtils.showAlert(title: "Alert", message: "No data found at this date!", viewController: self)
                  return}
  
  //             let maintenanceType = snapshot.value as? [String] ?? [""]
  //            print(maintenanceType)
  
          if let snapshot = snap.children.allObjects as? [DataSnapshot]{
  
              for snap in snapshot{
  
                  let maintenanceType = snap.value as? [String:Any]
                  for type in (maintenanceType?.values)!{
                      print(type)
  
  
                  }
  
  
              }
          }
  
  
      }
  </code></pre>