I'm trying to do something like the following:
{% for position in positions %}
{% if position['symbol'] != 'CASH' %}
<tr>
<td>{{position['symbol']}}</td>
<td>{{position['name']}}</td>
<td>{{position['shares']}}</td>
<td>{{position['price']}}</td>
<td>{{position['total']}}</td>
</tr>
{% else %}
{% cash = position['total'] %}
<tr>
<td>{{cash}}</td>
</tr>
{% endif %}
{% endfor %}
Is there a way to capture 'cash' and use it later in the html?