I am building an array of Strings in my Groovy code and want to pass the array to a JavaScript script contained in my code. However, Groovy doesn't put the strings in the array into quotes as Javascript expects. I'm passing the array using GStrings:
var strains = ${strainNames};
JavaScript evaluates it to this:
var strains = [pseudomonas_aeruginosa_D421, pseudomonas_aeruginosa_OC2E, pseudomonas_aeruginosa_EA0A, pseudomonas_aeruginosa_0812];
Is there a way to add quotes to each element or do I already have to add them in my Groovy code?