Querying users in Firebase with unique UID's as keys using Swift
<p>I'm trying to query users by lowercaseString name which I auto save when a user signs up.  The thing is I'm creating keys for users using their uid's.  Now I'm having trouble letting other users find their friends because all I'm pulling back is the very first key "user". Here's my firebase info...
<a href="https://i.stack.imgur.com/sfasH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sfasH.png" alt="Firebase data of user with keys: caseUsername, displayName, follows, and image"></a></p>

<p>Here is my code...</p>

<pre><code>let userRef = self.ref.childByAppendingPath("users")
userRef.queryOrderedByChild("caseUsername")
       .queryStartingAtValue(self.searchTXTFLD.text?.lowercaseString, childKey: "caseUsername")
       .observeEventType(.Value, withBlock: { (snapshot) -&gt; Void in
           print(snapshot.key)
</code></pre>

<p>Please help me find users using <code>self.searchTXTFLD.text?.lowercaseString</code>. It should equal user child <code>caseUsername</code>.</p>