0
我的數據是由100或像這樣的行組成的。如何通過mustache.js在二維表中呈現數據?
{"data":[
{"country":["AD"], "number":["41","2","33","56","45","50","57","68"]},
{"country":["AE"], number":["5","9","2","19","7","11","6","1"]}
]}
我要呈現在二維數組形式
<tr>
<td>Country</td>
<td>Value of number on date1</td>
<td>Value of number on date2</td>
<td>Value of number on date3</td>
<td>Value of number on date4</td>
<td>Value of number on date5</td>
<td>Value of number on date6</td>
<td>Value of number on date7</td>
</tr>
的腳本模板,我用 -
<tbody>
{{#data}}
<tr>
<td>{{country}}</td>
{{#number}}
<td>{{number}}</td>
{{/number}}
</tr>
{{/data}}
</tbody>
全國唯一被渲染而不是數字。有人能解釋我做錯了什麼嗎?