title: React, Firebase: Access values of JSON and also get key value
body: <p>I am beginner working with firebase, react. I am able to get the required data from firebase based on userEmail. But I am very confused in accessing the data. </p>
  
  <pre><code>firebase.database().ref('/users').orderByChild('email').equalTo(userEmail).on('value', data =&gt; {
          console.log('data: ', data);
      })
  </code></pre>
  
  <p>I get the following output: </p>
  
  <pre><code>data:  Object {
  "-Lhdfgkjd6fn3AA-": Object {
          "email": "t5@gmail.com",
          "favQuote": "this is it",
          "firstName": "t5",
          "lastName": "l5",
      },
   }
  </code></pre>
  
  <p>Please help me how to access all values ("-Lhdfgkjd6fn3AA-" , firstname, lastname, email and favQuote) into variables like: data.firstName, data.lastName, data.key, etc   . Thank you. </p>