title: Accessing data from Axios GET request
body: <p>I'm having trouble accessing data from an Axios GET request. I'd like to be able to iterate through all of the data I get and create a table that displays the username, avatar, and score for each user. The only way I'm able to currently render a single username is with the following code:</p>
  
  <pre><code>  this.setState({name: res.data[0].username}); 
  </code></pre>
  
  <p>But the above code only gives me access to the first object in the URL I use in the GET request. If I use this code:</p>
  
  <pre><code>this.setState({name: JSON.stringify(res.data)});
  </code></pre>
  
  <p>I'm able to render the entire object as a string. So that makes me think I need to update my render method, but I'm not sure how.</p>
  
  <p><strong>What steps should I take so that I can map over the state that I'm setting and render each user's data in a table or list?</strong></p>
  
  <pre><code>class LeaderBoard extends React.Component {
  
   constructor(props) {
      super(props)
    this.state = {
      name: []
            }
    }
  
  componentDidMount(){
  
  axios.get('https://fcctop100.herokuapp.com/api/fccusers/top/recent').then(res =&gt; 
  {
  
  this.setState({name: res.data[0].username});
     }); 
  
  }
  
  
  render () {
  
  return (
    &lt;div&gt;
      &lt;h1&gt;{this.state.name}&lt;/h1&gt;
  
    &lt;/div&gt;
    )
   } 
  }
  
  
  ReactDOM.render(
  &lt;LeaderBoard/&gt;, document.getElementById("app"));
  </code></pre>