title: Render JSON data using React
body: <p>I have this JSON data I am trying to render as a list.</p>
  
  <pre><code>[{
      "id": "1",
      "name": "Bill"
  }, {
      "id": "2",
      "name": "Sarah"
  }]
  </code></pre>
  
  <p>I am trying to display the data such that I pass a title of the data and the id's as parameters from Parent class to Child class and the latter prints the data as list.  </p>
  
  <pre><code>export default class Parent extends Component {
    render() {
      return (
          &lt;div&gt;
          &lt;Child
            title={"Group 1"}
            options={this.props.data.name}
          /&gt;
          &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>Here's my Child class:</p>
  
  <pre><code>export default class Child extends Component {
    render() {
      var data=this.props;
      var title=this.props.title;
      var name=this.props.name;
      return (
        &lt;ul&gt;
          &lt;h4&gt;{title}&lt;/h4&gt;
          &lt;div&gt;{this.props.map(item=&gt;
            &lt;li&gt;{name}&lt;/li&gt;
          )}
          &lt;/div&gt;
        &lt;/ul&gt;
      );
    }
  }
  </code></pre>
  
  <p>What I don't understand is how to use map in the Child class to display data. I know that I shouldn't write <code>this.props.map(item=&gt;</code>. I am new to React and would appreciate some help fixing this.</p>