title: Swift 3 and Firebase: Retrieve auto id value from snapshot
body: <p>I created the structure below on firebase and I need to get the auto id underlined in red:</p>
  
  <p><a href="https://i.stack.imgur.com/CnfvX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CnfvX.png" alt="enter image description here"></a></p>
  
  <p>The code I created to query the values:</p>
  
  <pre><code>let query = reference.queryOrdered(byChild: "receiverId").queryEqual(toValue: "LKupL7KYiedpr6uEizdCapezJ6i2")
          //Start process
          query.observe(.value, with: { (snapshot) in
              guard snapshot.exists() else{
                  print("Data doesn't exists")
                  return
              }
              print(snapshot.key)
  }
  </code></pre>
  
  <p>My "<strong>snapshot.value</strong>" results in:</p>
  
  <pre><code>Optional({
      "-KaRVjQgfFD00GXurK9m" =     {
          receiverId = LKupL7KYiedpr6uEizdCapezJ6i2;
          senderId = bS6JPkEDXIVrlYtSeQQgOjCNTii1;
          timestamp = 1484389589738;
      };
  })
  </code></pre>
  
  <p>How do I get only the string <strong>-KaRVjQgfFD00GXurK9m</strong> from the node above?</p>
  
  <p>I had tried using "<strong>print(snapshot.key)</strong>" but it results on the user ID:
  <strong>bS6JPkEDXIVrlYtSeQQgOjCNTii1</strong></p>
  
  <p>Some ideas? Thank you very much.</p>