I have list of hash maps and I am looking for list of UserId.
Data like:
[
{UserId=10033, name=Siegmund},
{UserId=10034, name=Sied},
{UserId=10035, name=mund}
]
I am trying like:
List<HashMap<String, Object>> result =
(List<HashMap<String, Object>>) resultMap.get("resultList");
result.forEach(mapObj -> {
System.out.println(mapObj.get("UserId"));
});
But looking for some better solution for this. Thanks
List<HashMap<String, Object>>instead ofMap<UserId, String>?