title: Render object in reactjs
body: <p>I have symfony rest api and I'm writing some frontend for this (1st time using react). So, here is my index.js: </p>
  
  <pre><code>import React, {Component} from 'react';
  import ReactDOM from 'react-dom';
  import axios from 'axios';
  
  class App extends Component {
      constructor(props) {
          super(props);
          this.state = {
              visits: []
          };
      }
  
      componentDidMount() {
          const url = 'http://localhost/app.php/api/visits?from=2017-05-05&amp;to=2017-05-08';
          axios.get(url)
              .then(response =&gt; response.json())
              .then(
                  visits =&gt; this.setState({visits})
              ).catch(err =&gt; err)
      }
  
      render() {
          return (
              &lt;div&gt;
                  &lt;ul&gt;
                      {this.state.visits.map((visit, index) =&gt; &lt;li key={index}&gt;{visit}&lt;/li&gt;)}
                  &lt;/ul&gt;
              &lt;/div&gt;
          )
      }
  }
  const app = document.getElementById('app');
  ReactDOM.render(&lt;App/&gt;, app);
  </code></pre>
  
  <p>Response from api looks like:</p>
  
  <pre><code>{
      "2017-05-05":  2,
      "2017-05-06":  8,
      "2017-05-07": 10,
      "2017-05-08":  1,
  }
  </code></pre>
  
  <p>How can i iterate through that and print it to the screen?
  Now i don't get any errors, just getting response from server but don't have anything on the screen.</p>
  
  <p>Greetings</p>