How can i get only keys from firebase?
问题 I have a structure of database as on image and I need to display this date which is in the red rectangle. I tried to do smth like this, but it throws an error and I couldn't find same questions on a stack. my database reference.child("doc1").observe(.value, with: { (snapshot) in if snapshot.exists() { for date in (snapshot.value?.allKeys) } 回答1: Your structure is a Dictionary of Dictionary so you have to cast your snap to [String:[String:Any]] where the key is your "11dot..." and value