I have a dust.js template file to which I pass 2 arrays:
- 1 array of options for a dropdown multiple select
- 1 array of selected options
How can I select the options in the dropdown in dust.js?
Here is an example:
The data I send to the template
var selectOptions = [1,2,3,4,5,6,7,8,9,10,11,12,13];
var selectedValues = [3,7,9];
The template
<select multiple>
{#selectOptions}
<option>{.}</option>
{/selectOptions}
</select>
How can I use the {selectedValues} to select those options?
Thanks in advance for your help.