I'm kind of lost to access some info in my static data. Here's the data :
{
info1: {
label: label,
class: class-css,
title: title,
text: text,
number: 20,
tags: [
{
name: #twitter
},
{
name: #myspace
}
]
},
info2: {
label: label,
class: class-css,
title: title,
text: text,
number: 20,
tags: [
{
name: #instagram
},
{
name: #facebook
}
]
}
}
Then I get the first info like that :
this.setState({
currentLabel: this.state.labels[info1]
})
This is why I want and then I want to display info in a component and it's working until I try to get tags
information. I tried a .map()
but without success and error.
<View>
<Text>{infoDetail.title}</Text>
<Text>{infoDetail.text}</Text>
<Text>How do I get tags information</Text>
</View>
Is it possible to access these objects in the array tags ?