title: React Native display simple Json Data
body: <p>I am trying to create a simple page, in which I want to display the data i get from the Json file. Unfortunately I get <em>"Invariant Violation: Objects are not valid as a React child (found: object with keys {ts, trend, baro, temp, hum, wind, rain, et, forecast, sun}). If you meant to render a collection of children, use an array instead."</em></p>
  
  <p>So it loads the Json but I cant display the data. If tried various methods, but couldnt solve it.</p>
  
  <p><strong>App.js</strong></p>
  
  <pre><code>import React from 'react'
  import { AppRegistry, StyleSheet, FlatList, Text, View, Alert, ActivityIndicator, Platform} from 'react-native'
  
  export default class Planner extends React.Component {
    constructor(props)
    {
  
      super(props);
  
      this.state = { 
      isLoading: true
    }
    }
  
    componentDidMount() {
  
         return fetch('url')
           .then((response) =&gt; response.json())
           .then((responseJson) =&gt; {
             this.setState({
               isLoading: false,
               dataSource: responseJson
             }, function() {
               // In this block you can do something with new state.
             });
           })
           .catch((error) =&gt; {
             console.error(error);
           });
       }
  
  FlatListItemSeparator = () =&gt; {
      return (
        &lt;View
          style={{
            height: 1,
            width: "100%",
            backgroundColor: "#607D8B",
          }}
        /&gt;
      );
    }
  
    render() {
  
      if (this.state.isLoading) {
        return (
          &lt;View style={{flex: 1, paddingTop: 20}}&gt;
            &lt;ActivityIndicator /&gt;
          &lt;/View&gt;
        );
      }
  
      return (
  
  &lt;View&gt;
  
          data ={ this.state.dataSource }
  
            renderItem={({item}) =&gt; &lt;Text &gt; {item.temp.out.c} &lt;/Text&gt;}
  
            keyExtractor={(item, index) =&gt; index}
  
  &lt;/View&gt;
  
      );
    }
  }
  </code></pre>
  
  <p><strong>Json</strong></p>
  
  <pre><code>{
    "ts": 1530290929,
    "trend": {
      "val": -20,
      "text": "langsam fallend"
    },
    "baro": 1010.4310482000001,
    "temp": {
      "out": {
        "f": 85.9,
        "c": 29.9
      }
    },
    "hum": {
      "out": 29
    },
    "wind": {
      "speed": {
        "mph": 5,
        "kmh": 8
      },
      "avg": {
        "mph": 3,
        "kmh": 4.8
      },
      "dir": {
        "deg": 58,
        "text": "ONO"
      }
    },
    "rain": {
      "rate": 0,
      "storm": 0,
      "day": 0,
      "month": 100.33,
      "year": 451.358
    },
    "et": {
      "day": 176,
      "month": 480,
      "year": 1673
    },
    "forecast": {
      "val": 6,
      "rule": 45,
      "text": "Zunehmend wolkig bei gleichbleibender Temperatur."
    },
    "sun": {
      "uv": 1.3,
      "rad": 322,
      "rise": "4:25",
      "set": "20:37"
    }
  }
  </code></pre>
  
  <p>Thanks in advance!</p>