Display list of data from API response that has a different format.

I am trying to display a list of data from API response with a response value as below:
{
count: 1000,
data: [
// list of data
]
}
{
count: 1000,
data: [
// list of data
]
}
I get back response as above and now want to display them in antd Table component with pagination as total count to be count value from response.
3 Replies
Omer
Omer2y ago
Hey @dipbazz , You can override your data provider to return this format ⚡️ https://refine.dev/docs/faq/#how-i-can-override-specific-function-of-data-providers
FAQ | refine
How can I change the form data before submitting it to the API?
absent-sapphire
absent-sapphire2y ago
Hey @Omer, I am trying to override the data provider but all those variables I am using on the method are undefined. Like apiUrl, httpClient and so on. I am somewhat confused with this overriding. Is there any working example regarding this?
Omer
Omer2y ago
GitHub
real-world-example/dataProvider.ts at main · refinedev/real-world-e...
Exemplary real world application built with refine - real-world-example/dataProvider.ts at main · refinedev/real-world-example