title: How do I get the key of a value in FirebaseDatabase using Flutter / Dart?
body: <p>I'm trying to get the key of a child that I've already returned from the database. In the example below, I have the user selected as Carlos Sainz and I'm trying to get "csainz" however the code below returns "email". </p>
  
  <pre><code>    DatabaseReference keyRef = FirebaseDatabase.instance.reference();
      await keyRef.child('users')
          .child('email')
          .equalTo(userList[0].email) // userList[0].email returns Carlos' email
          .once()
          .then((DataSnapshot dataSnapshot) {
            String newKey = dataSnapshot.key;
            print(newKey);
      });
  </code></pre>
  
  <p>Here is how my db is setup:
  <a href="https://i.stack.imgur.com/BCLSN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BCLSN.png" alt="enter image description here"></a></p>