I’m passing a map named grossScores into a GSP and need to reference individual instances of the map using another variable in the GSP. For example,
grossScore.Bob = 5
The posting How to reference a grails GSP model variable indirectly e.g. via .get(…) is helpful but I still couldn’t get there.
I’ve tried:
${grossScore."{$player}"}
${pageScope.getProperty("grossScore.${player}")}
${request.getAttribute("grossScore.${player}")}
Any suggestions?
Try:
assuming the name of the map is grossScores, as in your question.