I have a hashmap with k v, and there are some dup keys there, like:
123 foo
123 goo
345 ggg
567 kkk
I want to populate my html table with this info, even if there is duplicates, so this is how I could just print it:
for (Map.Entry<String, List<String>> entry : total.entrySet()) {
for (String s : entry.getValue()) {
System.out.println(entry.getKey() + " " + s);
}
}
so now how can I populate the table, i tried something like this:
<table id="ptable" border="1">
<tr>
<td style="text-align: center;">ID</td>
<td style="text-align: center;">Month</td>
</tr>
</table>
and then:
< c:forEach var="employeeHash" items="${employeeHash}" >
<td>${employeeSkills.key.id}</td>
</c:forEach>
but I dont know how to get to the value for each key...
i want the final res to look like:
key val
123 kkk
123 fff
345 lll