Im using normalizr to normalize the api response based on id. So the final normalized response will be
{
"names": {
"12": {
"Name": "ABC",
"Status": "0",
"Count": 11,
},
"31": {
"Name": "CDE",
"Status": "1",
"Count": 12,
}
}
}
How i can use this names object map in a flat list. Its not an array but an object map.
What's the best way to do this?
PS: I know there is lodash _.values() function, but i think it will slow for a huge response.
First you can change your object to return an array with
Object.keys
This your data
you can do with
this will return an array
then you can render your data to
FlatList
with a map function