title: Firebase Swift: Converting Snapshots to Dictionary
body: <p>I have the following snapshots and I'm trying to create an array of dictionary. I have been fiddling ways to cast as [String: Bool] or getting snapshot.value or whatsoever but can't seem to work correctly. Any advice how can I go about doing it?</p>
  
  <pre><code>ref.child("activities").child(userUID!).observe(.childAdded, with: { (snapshot) in
         print(snapshot)
  }) { (error) in
         print(error.localizedDescription)
  }
  </code></pre>
  
  <p>The snapshots looks like this:</p>
  
  <blockquote>
    <p>Snap (Person1) 0</p>
    
    <p>Snap (Person2) 0</p>
    
    <p>Snap (Person3) 0</p>
  </blockquote>
  
  <p>I am trying to write an array like this:</p>
  
  <pre><code>Optional(["Person3": false, "Person2": false, "Person1": false])
  </code></pre>
  
  <p>Some advice is much appreciated, thanks!</p>