title: Firebase and swiftyJSON parsing
body: <p>swiftyJSON looks great for parsing Firebase. What would like to end up with is 2 possibilities:</p>
  
  <p>An <code>imageName</code> for one individual ID, and a list of <code>imageName</code>s for all IDs. JSON Struture:</p>
  
  <p><a href="https://i.stack.imgur.com/FAvRh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FAvRh.png" alt="enter image description here"></a></p>
  
  <p>Code that retrieves JSON fine, but does not display <code>imageName</code> values:</p>
  
  <pre><code>ref.observe(FIRDataEventType.value) {
            (snapshot: FIRDataSnapshot!) in
  
              let json = JSON(snapshot.value)
              //  print("JSON:  \(json)")
  
              // PRINT IMAGENAME - NOT WORKING
              if let imageName = json[12345][0]["imageName"].string {
                  print("imageName: \(imageName)")
              }
  
            // // PRINT IMAGENAME - NOT WORKING
            let theKeys = json.dictionary!.keys
  
            for key in theKeys {
              let imageName = json[0][0]["imageName"]
              print("imageName: \(imageName)")
            }
  }
  </code></pre>
  
  <p>My end result is to end up with an imageURL to display in a CollectionView. It seems close, just not getting the swiftyJSON format correct. Thanks.</p>