code in the repository is
@Query("select divisionName, count(stundeName)FROM StudentDetails GROUP BY divisionName")
public List<Object> getDivisionCount();
and code in service is
List <Object> countList= studentDetailsRepository.getDivisionCount();
now I want to iterate through countList and categories then into different categories, I tried this
for(int i=0;i< countList.size();i++ )
System.out.println(countList.get(i).getClass().getDeclaredField('count'));
it's not working and giving an error