I had tried this for whole day and hope could be fix now.
I am trying to get the name and value
example - Car Make - Others Brands, Year - 2021, Fuel - Diesel
try this code but empty
<FlatList
data={Object.keys(data)}
renderItem={({ item }) => (
<>
<Text>{item.s_name}</Text>
<Text>{item.values.s_name}</Text>
</>
)}
/>
TypeError: Cannot read properties of undefined (reading 's_name')
Api response from the server
{
"1": {
"pk_i_id": "12368",
"fk_i_attribute_id": "1",
"fk_i_item_id": "60730",
"s_name": "Car Make",
"locales": {
"en_US": "Car Make"
},
"values": {
"355": {
"pk_i_id": "355",
"s_value": null,
"s_name": "Others Brands",
"locales": {
"en_US": "Others Brands"
},
"hierarchy": {
"355": {
"pk_i_id": "355",
"s_name": "Others Brands",
"locales": {
"en_US": "Others Brands"
}
}
}
}
}
},