How can I map an array returned by json to a column in a table
<p>I have javascript that does a query to my server.  The data returned looks like this:</p>

<pre><code>Json(new {  ansData = ansData,
                  success = true,
                  correct = score });
</code></pre>

<p>When I place a breakpoint on my browser and look I see the following in the json.ansData array:</p>

<pre><code>ansData [false, false, true]    
0 false 
1 false 
2 true
</code></pre>

<p>What I need to do is to somehow map this to a table so that if the element is false then nothing happens but if the element is true then the img gets changed to "/tick.png"</p>

<pre><code>&lt;table&gt;
&lt;tr id="ans_0"&gt;
   &lt;td id="ansData[0]"&gt;&lt;img src="/blank.png"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id="ans_1"&gt;
   &lt;td id="ansData[1]"&gt;&lt;img src="/blank.png"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id="ans_2"&gt;
   &lt;td id="ansData[2]"&gt;&lt;img src="/blank.png"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>Here's my ajax call:</p>

<pre><code>$.ajax({
        type: "POST",
        traditional: true,
        url: '/Test/Cities/JsonCheck',
        data: parms,
        dataType: "json",
        success: function (json) {
           ...  
        }
</code></pre>

<p>Can someone suggest how I could do this. I am pretty familiar with jQuery but I have never had to do anything like map an array with true false values to elements in my DOM.</p>
