Converting JSP to HTML (HTL)
JSP code
<c:set var="roomdetails" value="${roomcontroller.roomDetailsfromRequest}" />
<c:set var="code" value="${roomcontroller.roomCode}" />
<c:set var="matched_room" value="${roomdetails[code]}" /> (variables above)
Returns the following values:
roomdetails:{A2-ET=url.models.hotelreservation.Room@name1, W1-
ET=url.models.hotelreservation.Room@name2}
code: W1-ET
matched_room: url.models.hotelreservation.Room@name2
HTL:
<sly data-sly-set.roomdetails="${roomcontroller.roomDetailsfromRequest}" />
<sly data-sly-set.code="${roomcontroller.roomcode}" />
<sly data-sly-set.matched_room="${roomdetails['code']}" /> (variables above)
also tried:
<sly data-sly-set.matched_room="${roomdetails[code]}" /> (variables above)
Returns the following values:
roomdetails:{A2-ET, W1-ET}. (any data after the "=" is not showing up, although in the java when I log the output, I'm getting the full return as above)
code: W1-ET
matched_room: (nothing)
The Java is the same in both for these and is producing the same data output.

