title: fetching values from server for multiselect picker react native
body: <p>I tried fetching values from server for multi select picker component from the package <a href="https://github.com/toystars/react-native-multiple-select" rel="nofollow noreferrer">https://github.com/toystars/react-native-multiple-select</a>. But i get an error message:  TypeError: null is not an object(evaluating this.state.LangKnown).</p>
  
  <p>Please Kindly help.Thank u</p>
  
  <p><strong>My JSON values</strong></p>
  
  <pre><code>{
   "MFBasic": {
     "SkinTones": "DARK,FAIR,VFAIR",
     "Build": "SLIM,ATHLETIC,PLUMPY",
     "Gender": "F,M,T",
     "Genre": "ACTION,COMEDY,DRAMA",
     "Languages": "ENG,HINDI,TAM",
     "MediaModes": "ADS,MOVIES,SHORTFILMS",
     "Tags": "BIKES,HOME,JEWELLARY"
    },
   "Result": "Successfully Loaded MF Basic Details",
   "Code": 100
  </code></pre>
  
  <p>}</p>
  
  <pre><code> import React, {Component} from "react";
   import { Text, View, StyleSheet, Picker, Alert } from "react-native";
   import MultiSelect from "react-native-multiple-select";
  
  export default class App extends React.Component {
    state = {
      LangPickerValueHolder: [],
      LangKnown: []
    }
  
    componentDidMount () {
      fetch('https://movieworld.sramaswamy.com/GetMFBasicDetails.php', {
        method: 'POST',
        headers: {
          'Accept': 'application/json',
          'Content-Type': 'application/json'
        }
      }).then(response =&gt; response.json())
        .then(responseJson =&gt; {
          let langString = responseJson.MFBasic.Languages;
          let langArray = langString.split(',');
          this.setState({
            LangPickerValueHolder: langArray
          });
        }).catch(error =&gt; {
          console.error(error);
        });
    }
  
    render () {
      return (
  
        &lt;View style={styles.itemContainer}&gt;
          {&lt;MultiSelect
            ref={(component) =&gt; { this.multiSelect = component; }}
            onSelectedItemsChange={(value) =&gt;
              this.setState({ LangKnown: value })
            }
            selectedItems={this.state.LangKnown}
            onChangeInput={ (text) =&gt; console.log(text)}
            displayKey = ''name
            submitButtonText="Submit"&gt;
            {this.state.LangPickerValueHolder.map((item, key) =&gt; (
              &lt;MultiSelect.Item item = {item} uniqueKey = {key}/&gt;
            ))}
          &lt;/MultiSelect&gt;}
        &lt;/View&gt;
      );
    }
  }
  </code></pre>