How to group and set lists of Services and SubServices in object of CustomerResult POJO?
posted 4 weeks ago
I have an arrayList customerDataList of objects of CustomerData POJO which has customerId, serviceId, subServiceId, messageCount. I want to iterate this customerDataList and set list of subservices in object Services POJO and then list of services objects in object of CustomerResult pojo.How can I do this?
Below are the classes for CustomerData,Service,SubService, CustomerResult: