Мои навыки реагирования являются базовыми, и я пытаюсь получить конкретное значение ключа от json без массива, например:
<Text>{category_title[0]}</Text>
Выходы Json
[
{
"post_id": 1,
"category_title": "Football,Sports,LaLiga,Real Madrid"
}
]
Позвоните Json
componentDidMount() {
return fetch(ConfigApp.URL+'json/data_categories.php?post='+this.props.navigation.state.params.item)
.then((response) => response.json())
.then((responseJson) => {
this.setState({
isLoading: false,
dataSource: responseJson
}, function() {
});
})
.catch((error) => {
console.error(error);
});
}