title: how to parse loop for json in react js
body: <p>I am new to react. </p>
  
  <pre><code>    this.state = { histories: [
                     {
                    "qas":[
                      {"question": "hi1", "answer": "hello1"},
                      {"question": "hi2", "answer": "hello2"}
  
                    ]
                  }
                ] };
  render(){
      return ( 
        &lt;div&gt;
            &lt;History 
            histories={this.state.histories} /&gt;
        &lt;/div&gt;
      );
    }
  </code></pre>
  
  <p>In separate component page, I would like to use react js to render question and answer by loop or map, however I tried map, it didn't recognize map. I have tried for loop, but it didn't get the child attribute from it.</p>
  
  <pre><code>   const history = ({histories}) =&gt; { 
       return(
            &lt;div&gt;
                {histories[0].qas[0].question}
            &lt;/div&gt;
            &lt;div}&gt;
              {histories[0].qas[0].answer}
            &lt;/div&gt;
        );
  }
  </code></pre>