Hello i want to make a flatlist with the geojson data
i want to access to 3 properties attributes and iterate it
the problem is i have only access in one data the same data is iterate it
//mon code
//la requete retourne un geojson
const getAllAgr = () => {
fetch('https://api.tolbico.com/api/agences/1/agriculteurs/', {
method: 'GET',
headers: {
'Authorization': 'Bearer '+ Token,
'Content-Type': 'application/json'
},
}).then((response) => response.json())
.then((json) =>{
setAgriculteurs(geo.getProperties(json))
})
}
useEffect(()=>{
getAllAgr()
},[])
return (
//flatlist pour afficher les information
<SafeAreaView>
<FlatList
data={agriculteurs}
//keyExtractor={(item) => item.id.toString()}
renderItem={({item}) => <ListesAgr agro={item}/> }
/>
</SafeAreaView>
)
}