title: React - how can I get a get response and print it in li?
body: <p>I have the answer from the server:</p>
  
  <pre><code>    "status": "fail",
      "test_result": {
          "passed": [
              {
                  "test": "app.test.test_auth.MyTest.test_success"
              }
          ],
          "errors": [
              {
                  "test": "app.test.test_auth.MyTest.test_error",
                  "traceback": "Traceback (most recent call last)"
              }
          ]
      }
  </code></pre>
  
  <p>And the code of React application:</p>
  
  <pre><code>class Test extends Component {
  
      constructor(props) {
          super(props);
  
          this.state = {
              test_result: {}
          };
          this.handleCLick = this.handleCLick.bind(this)
      }
  
      handleCLick() {
          axios.put('http://localhost:8000/sc')
              .then(response =&gt; {
                  this.setState({test_result: response.data.test_result});
                  })
      }
  
      render(){
          return (
              &lt;div&gt;
                  &lt;button onClick={this.handleCLick}&gt;Start&lt;/button&gt;
                  &lt;ul&gt;
                      &lt;li&gt;
                          {this.state.test_result}
                      &lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
          )
      }
  }
  </code></pre>
  
  <p>How can I get "test" element from every "test_result" in server's answer? I want to print it in li html elements. I read about map function and tried it, but it didn't worked. I think here should be 2 map functions for "test_result" and "errors"/"passed", should not it?</p>