title: The snapshot is not represented correctly
body: <p><img src="https://i.stack.imgur.com/aWlG6.png" alt="database screen shoot"></p>
  
  <p>This is the code responsible for uploading text of a post for a blogging app  the text of the post is retrieved correctly and saved in snapshot </p>
  
  <pre><code>struct postt {
  let username : String!
  let textofpost : String!
   }
  
  
  class TableViewController: UITableViewController {
  
  
  var databaseref = FIRDatabase.database().reference()
  var loggedinuser : AnyObject?
  
  var posts = [postt]()
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      self.loggedinuser = FIRAuth.auth()?.currentUser
  
        self.databaseref.child("users").child(self.loggedinuser!.uid).observeSingle
         Event(of: .value) {(snapshot:FIRDataSnapshot) in
  
          let snapshot = snapshot.value as! [String:AnyObject]
  
          let username = snapshot["name"] as? String
  
                        self.databaseref.child("posts").queryOrderedByKey().observe(.childAdded,  with: {( snapshot: FIRDataSnapshot) in
  
  
              let snapshot = snapshot.value as? NSDictionary
  </code></pre>
  
  <p>The next variable  textofpost doesn't contain anything and i don't know what is the problem so when i represent the cell only the label appears which has a snapshot from the path name in the node users     </p>
  
  <pre><code>            let textofpost = snapshot?["text"] as? String
  
              self.posts.insert(postt(username : username, textofpost : textofpost), at: 0)
               // self.feeds.reloadData()
              self.tableView.reloadData()
          }
  
          )}
  
  
  }
  
  override func numberOfSections(in tableView: UITableView) -&gt; Int {
  
      return 1
  }
  
  override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
  
      return self.posts.count
  
  }
  
  
  
  
    override func tableView(_ tableView: UITableView, cellForRowAt            indexPath: IndexPath) -&gt; UITableViewCell {
  
      let cell = tableView.dequeueReusableCell(withIdentifier: "Cell",      for: indexPath)
  
  
      let label = cell.viewWithTag(1) as! UILabel
      label.text = posts[indexPath.row].username
       let textview = cell.viewWithTag(2) as! UITextView
      textview.text = posts[indexPath.row].textofpost
  
  
      return cell
  }
  </code></pre>
  
  <p>}</p>