title: how to solve typeError when API calling
body: <p>i have below json i want show image in List View and show images but its show me below error i'm learning react-native i was get function from example page but not success according to my requirement anyone help me this highly appreciate</p>
  
  <blockquote>
    <p>TypeError:undefined is not a function(evaluating 'data.map')</p>
  </blockquote>
  
  <pre><code> async  getMoviesFromApi() {
    try {
      let response = await fetch(
        'http://example.com:2580/api/subcategories/1'
      );
      let responseJson = await response.json();
      return responseJson;
    } catch (error) {
      console.error(error);
    }
  }
  
   render() {
  
    let data = this.getMoviesFromApi(); 
      const { navigate } = this.props.navigation;
      var navigationView = (
        &lt;View style={{flex: 1, backgroundColor: '#fff'}}&gt;
          &lt;Text style={{margin: 10, fontSize: 15, textAlign: 'left'}}&gt;I'm in the Drawer!&lt;/Text&gt;
        &lt;/View&gt;
      );   
      return (
  
        &lt;DrawerLayoutAndroid ref={'DRAWER_REF'}
          drawerWidth={300}
          drawerPosition={DrawerLayoutAndroid.positions.Left}
          renderNavigationView={() =&gt; navigationView}
          &gt;
          &lt;ScrollView style={{flex: 1, flexDirection: 'column'}}&gt;        
            {
              data.map((x) =&gt; {
                return(
                  &lt;View style={{width: '100%', height: 80, marginBottom: 20, backgroundColor: 'powderblue'}} &gt;
                &lt;Image source={{uri:x[0].imageurl}}
         style={{width: '100%', height: 80,}} /&gt;
                  &lt;/View&gt;
  
                ) 
              })
            }
            &lt;/ScrollView &gt;
          &lt;/DrawerLayoutAndroid&gt;
  
  
      );
    }
  </code></pre>
  
  <p>JSON</p>
  
  <pre><code> [
        {
          "ID": 1,
          "imageurl": "http://example.com:2580/Images/speedometer-540-2501.png",
           "langType": 1 
        },
        {
          "ID": 2,
           "imageurl": "http://example.com:2580/Images/image2.png",
          "langType": 1
        }
        ]
  </code></pre>