title: Accessing object in returned promise using fetch w/ react js
body: <p>I have this function: </p>
  
  <pre><code>  getUserData() {
      fetch(this.props.apiUrl + this.state.username + '?client_Id=' + this.props.clientId + '&amp;client_secret=' + this.props.clientSecret)
        .then(function(response) {
          var data = response.json();
          this.setState({
            userData: data
          });
          console.log(this.state.userData);
        }.bind(this))
        .catch(function(error) {
          this.setState({
            username: null
          });
          console.log(error)
        }.bind(this)) 
    }
  </code></pre>
  
  <p>Which returns this in the console:</p>
  
  <p>Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}</p>
  
  <p><strong>proto</strong>
    [[PromiseStatus]] : "resolved"</p>
  
  <pre><code>[[PromiseValue]] : Object
  avatar_url : "https://avatars.githubusercontent.com/u/"
  login      : "hello world"
  .
  .
  .
  </code></pre>
  
  <p>I need to access the name/value pairs in the object but I can't get to them. I'm assuming I need to take one extra step after I convert the response to json but can't figure it out. If anyone could help it would be greatly appreciated! </p>