Q:

Take elements from Json to input in Picker

I'm new in react native. I'm trying to fecth a webservice and input some element from response to a Picker (I use native-base). My problem is I don't know how to take an element (here it's LIBELLE) what I need in my Json.
see the code : 
getSurfaces(){
    fetch('yourWebservice')
        .then((response) => response.text())
        .then((responseText) => {
            parseString(responseText, function (err, result) {
                responseText = result;
            });
            console.log(JSON.stringify(responseText));
            this.setState({
                surfaces: responseText.Surfaces.surface
            }).catch(err => console.log(err));
            console.log(this.state.surfaces);
            }
        })
        .catch((err) => {
            console.log('Error fetching the feed: ', err)
        })
}

componentDidMount(){
    this.getSurfaces();
}

My constructor: 
constructor (){
    super();
    this.state = {
        date: '',
        surface: '',
        surfaces: [],
        start: '',
        hours : [],
    };
    this.valueChangeSurface = this.valueChangeSurface.bind(this);
}
valueChangeSurface(value: String){
    this.setState({
        surface: value
    });
}

My renderSurfaces method: 
renderSurface(){
    if(this.state.surfaces){
        return this.state.surfaces.map((surface) => {
           return <Picker.Item label={surface.LIBELLE} value={surface}/>
        })
    }
}

The render of Picker: 
<ListItem>
    <Left>
        <Text>Surface</Text>
    </Left>
    <Body>
        <Picker
            note
            inlineLabel={true}
            mode={"dropdown"}
            style={{width: 175}}
            selectedValue={this.state.surface}
            onValueChange={this.valueChangeSurface}>
            {
                this.renderSurface()
            }
        </Picker>
    </Body>
    <Right/>
</ListItem>

The error returned by this.setStatein getSurfaces():

Error fetching the feed:  [TypeError: undefined is not an object (evaluating '_this2.setState({
                      surfaces: responseText.Surfaces.surface
                  }).catch')]

I don't really know if I take the good way to do this, I would really appreciate your help

A:

I finally find a solution : 
The problem it was simple and the most part of it come from a syntaxe erreur, I replace : 
responseText.Surfaces.surface.LIBELLE

by this : 
responseText.Surfaces.surface[i].LIBELLE

See the entire code of getSurfaces(): 
getSurfaces(){ // Input the surfaces values (ID and LIBELLE) who come from WebService in the this.state.surfaces
    fetch('url')
        .then((response) => response.text())
        .then((responseText) => {
            parseString(responseText, function (err, result) {
                responseText = result;
            });
            let sf = []; // Create a table who gonna content the value of this.state.surfaces
            for(i = 0; i<responseText.Surfaces.surface.length; i++){
                sf.push(responseText.Surfaces.surface[i].LIBELLE.toString());
            }
            this.setState({
                surfaces: sf //inject the table sf who contain the table surfaces
            });
        })
        .catch((err) => {
            console.log('Error fetching the feed: ', err)
        })

}

