title: How can I get the key of the FirebaseRecyclerAdapter at populateViewHolder?
body: <p>I have a Firebase database with a JSON structure like this:</p>
  
  <p><strong>JSON</strong></p>
  
  <pre><code>root:{
    "users":{
      *push1*:{
        "name":"foo1",
        "email":"bar1"
      },
      *push2*:{
        "name":"foo2",
        "email":"bar2"
      }
    }
  }
  </code></pre>
  
  <p>In order to populate a RecyclerView, I am using the <a href="https://firebaseui.com/docs/android/com/firebase/ui/FirebaseRecyclerViewAdapter.html" rel="nofollow">FirebaseRecyclerViewAdapter</a> class at <a href="https://github.com/firebase/FirebaseUI-Android#using-firebaseui-to-populate-a-recyclerview" rel="nofollow">FirebaseUI</a>. The problem is that I can access both "name" and "email", but in addition I need to know the *push* string (something like <em>-KHjGvJ7o-UBxOVGpojI</em>), which I don't manage to get.</p>
  
  <p><strong>Is there any way to get the key of the reference, instead of just the value?</strong></p>
  
  <p>What I'm trying to do is adding a new value to the JSON, leaving it like:</p>
  
  <pre><code>"users":{
    *push*:{
      "name":"foo",
      "email":"bar",
      "phone":"whatever"
    }
  }
  </code></pre>
  
  <p>Just in case it is easier to get the reference rather than the key to generate it.</p>
  
  <p>Thanks!</p>