Quick info for reference.
Loop through a Map and output the Key and Value data using;
<c:forEach items="${map}" var="entry"> Key: <c:out value="${entry.key}"/> Value: <c:out value="${entry.value}"/> </c:forEach>
If you have an object within the Key:Value pair, such as within an object Map
${map.key}
Then you can iterate over the above list using the code to get the Attribute data within the CustomerInformation object a follows;
<c:forEach items="${map.value}" var="customerInformation"> <tr> <td>${customerInformation.firstName}</td> </tr> </c:forEach>
The following two tabs change content below.
Michael Cropper
Founder & Managing Director at Contrado Digital Ltd
Michael founded Contrado Digital in 2013. He has experience working with national and multi-national brands in a wide range of industries, helping them achieve awesome results. Michael regularly speaks at local universities and industry events while keeping up with the latest trends in the digital industry.
Latest posts by Michael Cropper (see all)
- How to Disable Safe Updates in MySQL Workbench - November 8, 2019
- How to Copy Data From a Colum in One Table to a Column in Another Table in MySQL - October 25, 2019
- How to Setup CIFS on Windows 10 to Share a Folder on the Network - September 8, 2019