title: mapping id from json response to key and use it for FlatList react-native
body: <p>I have a json from an api response as below:</p>
  
  <pre><code>centres = [{
      id: 1,
      name: "DEF",
      },{
      id: 2,
      name: "ABC",
    }]
  </code></pre>
  
  <p>Now I want to populate that above data in a FlatList</p>
  
  <pre><code>return(
    &lt;View&gt;
      &lt;FlatList
        data={this.state.centres}
        renderItem={({item}) =&gt; &lt;CentreComponent centre={item}/&gt;}
      /&gt;
    &lt;/View&gt;
  );
  </code></pre>
  
  <p>But I cant do the above as the data (centres) doesnt have a "key" property.</p>
  
  <p>Now I can loop through each item in the array and add a property "key" which has the same value as ID. But I find this in efficient.</p>
  
  <p>Is there a better way to map "id" column to "key" to render the FlatList</p>