155
Views
3
Comments
Solved
count data received from API
Question

Hi all,

I'm creating a reactive web app & trying to do pagination on it. I know how to count data receiving from an aggregate but data receiving from an API is something different.

How should I do it? Is there any Demo that is available on learning platform to do this for reactive web application? I'm searching it for a while now & couldn't  find it.

Regards

Sahil

2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Sahil,

Hope you're doing well.

It seems that your GetData data action is returning 2 different lists: StatewiseCases (List of StatewiseCase) and DailyCases (List of DailyCase).

If you want to get the TotalCount (total records of the list), you can use the Length property of the list:

GetData.StatewiseCases.Length

or

GetData.DailyCases.Length

depending on the list that you're working with.


This property will return the total number of the records of the list, which is exactly what you want as a TotalCount.


Kind regards,

Rui Barradas

2020-08-11 10-21-29
sahil saxena

Thanks Rui


Regards 

Sahil

2020-05-07 18-53-00
Rui Barradas
 
MVP

You're most welcome Sahil.


Kind regards,

Rui Barradas

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.