I want to achieve the data rendering in a form of table something like this:
I have a data (stored in variable 'myData') of form:
{
"id":0,
"name": ["wheat", "Rice", "Sugar"],
"Quality":["Good", "good","good"],
"Quantity":["200","200","200"]
}
I tried mapping the and together to implement this, but it renders the data horizontally in a single row.
This is what I tried to achieve so far with minimum test code.
return (
<View style={{flexDirection:'column'}}>{myData.map( (item) => {
return (
<View key={item.id}>
<View>
<Text>
{item.name}
</Text>
</View>
<View>
<Text >
{item.Quality}
</Text>
</View>
</View>
)
})}
</View>
)
Please help to achieve this
