Ryan Ryan - 11 months ago 39
Swift Question

Ambigious use of 'Key'

I am trying to print the Key name of a piece of data from Firebase using swift but I keep getting 'Ambigious use of Key' when I type something like:

for child in snapshot.children{

How can I avoid this? All help is appreciated very much!


Cast it as FIRDataSnapshot. Try doing this:

for child in snapshot.children{
 let child1 = child as! FIRDataSnapshot