title: Data display issue in FlatList from Realm database
body: <p>I have done inserting data into Realm database.</p>
  
  <p>Now, After inserting the data to db, am retrieving data from db and trying to display it in FlatList in react-native.</p>
  
  <p>But, it displying undefined in list.. and lots of rows are coming in FlatList with the value 'undefined'.</p>
  
  <p>Below is the render() method of my component :</p>
  
  <pre><code> render() {
      var A = realm.objects('Student_Info');
      var myJSON = JSON.stringify(A);
  
      return (
  
        &lt;View style={styles.MainContainer}&gt;
  
          &lt;TextInput 
                placeholder="Student Name"
                style = { styles.TextInputStyle } 
                underlineColorAndroid = "transparent" 
                onChangeText = { ( text ) =&gt; { this.setState({ Student_Name: text })} } 
              /&gt;
  
          &lt;TextInput  
                placeholder="Class"
                style = { styles.TextInputStyle } 
                underlineColorAndroid = "transparent" 
                onChangeText = { ( text ) =&gt; { this.setState({ Student_Class: text })} } 
              /&gt;
  
          &lt;TextInput 
                placeholder="Subject"
                style = { styles.TextInputStyle } 
                underlineColorAndroid = "transparent" 
                onChangeText = { ( text ) =&gt; { this.setState({ Student_Subject: text })} } 
              /&gt;
          &lt;TouchableOpacity onPress={this.add_Student} activeOpacity={0.7} style={styles.button} &gt;
            &lt;Text style={styles.TextStyle}&gt; Make Student Entry &lt;/Text&gt;
          &lt;/TouchableOpacity&gt;
  
          &lt;Text style={{marginTop: 10}}&gt;{myJSON}&lt;/Text&gt;
  
          &lt;FlatList      
            //data={this.state.dataSource}
            data={myJSON}
            ItemSeparatorComponent={this._flatListItemSeparator}
            renderItem={({ item }) =&gt;
              &lt;View style={{ flex: 1, flexDirection: 'row' }} &gt;
                &lt;Text style={styles.textView}&gt;{"Student Name : "+item.student_id}&lt;/Text&gt;
              &lt;/View&gt;
            }
            keyExtractor={(item, index) =&gt; index.toString()}
          /&gt;
        &lt;/View&gt;  
       );
  </code></pre>
  
  <p>What might be the issue ?</p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The json data i got from my db is as below : </p>
  
  <pre><code>{"0":{"student_id":1,"student_name":"Ashish","student_class":"React","student_subject":"React native"},"1":{"student_id":2,"student_name":"Ashish1","student_class":"React1","student_subject":"React native1"},"2":{"student_id":3,"student_name":"","student_class":"","student_subject":""},"3":{"student_id":4,"student_name":"","student_class":"","student_subject":""}}
  </code></pre>
  
  <p>Schema was reated using : </p>
  
  <pre><code> realm = new Realm({
        schema: [{
          name: 'Student_Info',
          properties:
          {
            student_id: { type: 'int', default: 0 },
            student_name: 'string',
            student_class: 'string',
            student_subject: 'string'
          }
        }]
      });
  </code></pre>