title: How to get objects of objects in react native?
body: <p>My JSON data is</p>
  <pre><code>[
    {
      id: 51,
      name: 'Boat Neck Blouse',
      image: {
        id: 669,
        date_created: '2018-08-27T10:05:39',
        date_created_gmt: '2018-08-27T10:05:39',
        date_modified: '2018-08-27T10:05:39',
        date_modified_gmt: '2018-08-27T10:05:39',
        src:
          'https://dreamdesigners.rkhomeappliances.co.in/wp-content/uploads/2018/08/boatneck.jpg',
        title: 'boatneck',
        alt: '',
      },
      menu_order: 0,
    },
  ];
  </code></pre>
  <p>I can get the name, id, and all but can't get <code>src of image object</code>.
  What I tried is</p>
  <pre class="lang-js prettyprint-override"><code>state = { data: [] };
  
  fetchData = async () =&gt; {
    const response = await fetch('mywebsite.com/json');
    const posts = await response.json();
    this.setState({ data: posts });
  };
  
  componentDidMount() {
      this.fetchData();
  }
  
  render() {
    return (
      &lt;Container&gt;
        &lt;ScrollView style={{ backgroundColor: '#eeeeee' }}&gt;
          &lt;View&gt;
            &lt;FlatList
              contentContainerStyle={styles.list}
              numColumns={2}
              data={this.state.data}
              keyExtractor={(x, i) =&gt; i.toString()}
              renderItem={({ item }) =&gt; (
                &lt;TouchableHighlight
                  style={{ width: '50%' }}
                  underlayColor=&quot;white&quot;&gt;
                  &lt;View style={styles.view}&gt;
                    &lt;Text&gt;{item.image.src}&lt;/Text&gt;
  
                    &lt;Text style={styles.text}&gt;{item.name}&lt;/Text&gt;
                  &lt;/View&gt;
                &lt;/TouchableHighlight&gt;
              )}
            /&gt;
          &lt;/View&gt;
        &lt;/ScrollView&gt;
      &lt;/Container&gt;
    );
  }
  </code></pre>
  <p>I just tried to display the src of the image but I get the below error.</p>
  <pre><code>TypeError: undefined is not an object (evaluating '_this3.item.image')
  </code></pre>
  <p>How to get the src from the image object? I'm a newbie in react native and react js. Please help me to get the image src.</p>