I've passed a map of [String, List[String]] to one of my views in Play. The user is selecting a value from a dropdown. This value is a key in my map. I am using this key to then populate a second dropdown using the value in the map - a list of String. However, I do not know how to use Play's template language to get the value out of my map since I'm retrieving the key via JavaScript.
This is my code:
function selectSubCat() {
var key = $("#monthYear").find(":selected").text(); // get the selected option's text. This is the map key.
// Here lies the issue. mailingRunDates is the name of the map I've passed to the view. Play says: val key not found.
var runDatesList = @mailingRunDates(key)