Javascript object to thymeleaf

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Javascript object to thymeleaf

bakpao_coklat
 I will make option (select option) from javascript where i loop like this

$.each (list, function (key,value)
{ item += 'option th:text = " '+value+ ' " th:value = " '+key+ ' "> </option>' ;
Console.log (item);
Console.log (key);
Console log (value);

}
Why key and value not render javascript variabel, but display key anda value as string. List is hashmap(array) and in console key and value display right