I have a C# Dictionary<string, Dictionary<string, object>>, and I am trying to display the data with nVelocity template and also I am trying to get the keys of the dictionary with an index. I am newbie.
Please help me with how to access keys with an index e.g. I want to access key at 0 index and also how can I display data with iterations and how do we put "break" statements in foreach loops?
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr class="HeaderOne">
<td align="left">Class</td>
#foreach($services in $VolumeSummary)
#foreach($item in $VolumeSummary[$services])
<td class="numeric-th">$item.AverageUnitPriceF</td>
#end
#break
#end
<td class="numeric-th">Average Price</td>
<td class="numeric-th">Total</td>
</tr>
#foreach ($item in $TotalsByServiceAndTermYear)
<tr style="color:#333;font-weight:normal;">
<td>$item.Service</td>
<td class="numeric-td">
$!item.Year
</td>
<td class="numeric-td">
$!item.AverageUnitPriceF
</td>
<td class="numeric-td">
$!item.TotalPriceF
</td>
</tr>
#end
</tbody>
</table>