#data
is the current data item (or data context, if you will).
See http://www.jsviews.com/#assigntag for a sample illustrating this.
In fact #data
is short for #view.data
and #view
is the current 'view'. See this sample for example: http://www.jsviews.com/#samples/jsr/paths.
Data paths such as foo.bar
start at the current data item, so #data.foo.bar
and foo.bar
are equivalent.
In your sample above you could go straight to the ID2
object, by writing:
<tr>
<td>ID2</td>
{{props ID2.items}}
<td>{{>key}} - {{>prop}}</td>
{{/props}}
</tr>
Other variants:
{{for ID2}}
<tr>
<td>ID2</td>
{{props items}}
<td>{{>key}} - {{>prop}}</td>
{{/props}}
</tr>
{{/for}}
or:
{{props #data}}
{{if key === "ID2"}}
<tr>
<td>{{:key}}</td>
{{for prop}}
{{props items}}
<td>{{>key}} - {{>prop}}</td>
{{/props}}
{{/for}}
</tr>
{{/if}}
{{/props}}