title: Looping 2D ArrayList in javascript
body: <p>Below data is returned from Servlet to JSP.</p>
  
  <pre><code>List&lt; List &lt; String &gt; &gt; formData = new ArrayList&lt; List&lt; String &gt; &gt;();
  </code></pre>
  
  <p>formData has <code>[[A, D], [, E], [B], [], [], [C]]</code></p>
  
  <p>I am unable to loop through above list using javascript in jsp.</p>
  
  <p>I tried assigning formdata to a variable and accessed it using index as below</p>
  
  <p>In JSP:</p>
  
  <pre><code>var myData = "${formData}";
  
  var i=0;
  
  var j=0;
  
  alert(myData[i][j]) 
  </code></pre>
  
  <p>alert shows the value as undefined.</p>
  
  <p>Please let me know how to loop through formData list.</p>