Getting the Count of same entries of data
Getting the Count of same entries of data
alvinmactal
Posts: 2Questions: 1Answers: 0
hi! how can I get the count of same data in the datatable?
for example,
There are 10 students in the table with attributes as Name, Age , Year, Birthdate, Section
And I want to get the total number of ages like 10, 12, 13 in a section.
Basically I want to get the summary of specific field after filtering.
Thank you in advance
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
What you'd need to do is use
rows().data()
to get the data for the rows and then loop over them, "binning" the data - i.e. if age === 10, totalAges[10]++; etc.Allan