how to get the individual polygon from the vtkpolydatareader (*.vtk)

Hi,

Can anyone help me to get the separate polygon from the set of polys array ?
var reader = vtk.IO.Legacy.vtkPolyDataReader.newInstance();
const polydata = reader.getOutputData();
const polys = polydata.getPolys().getData();
from the 1D array of point id how to get the total number of individual polygons point id ?