title: How to convert java arraylist to javascript array?
body: <p>How do we convert java array list of String objects to java script array?</p>
  
  <p>This is what I am doing but I am looking for a better way to do it. I dont want to iterate over the array list.</p>
  
  <pre><code>var myArray = [
  &lt;c:forEach items="${myList}" var="item"&gt;
              {itemName: "${item.name}"},
  &lt;/c:forEach&gt;
          ];
  </code></pre>
  
  <p>Thanks.</p>