I have this array of data that have 4 objects, and after selecting manually one of this, I don't know how to get all the information inside. For example I want all the data that is inside 'pois' (another array)...I was thinking that should be something like this:
{api.monuments.map((monumento, index) => (
{monumento.pois.map((poi, index2) => (
<TouchableHighlight
onPress={() => this.onClick(convento)}
style={styles.monumentoContainer}
key={index2}
>
<Image style={styles.monumentoPic} source={{uri:'http://192.168.56.1:3000/'+poi.image}}>
<View style={styles.monumentoTitleContainer}>
<Text style={styles.monumentoTitle}>{poi.name}</Text>
</View>
</Image>
</TouchableHighlight>
))}
))}
But it's not - image of the error, so how can I do it?
Another question is: since I have an array with 4 objects, and each one have a specific category, how can I select only the object that have the 'category' == 'xxxxx'?
Hope you can help me! Thank you