{%- if filetype_loop == 0 %}VLAN,MAC Address,Interface,Entry Type
{%-     for vlan in to_parse_mac_address_table.vlans %}
{%-         for mac in to_parse_mac_address_table.vlans[vlan].mac_addresses %}
{%-             for interface in to_parse_mac_address_table.vlans[vlan].mac_addresses[mac].interfaces %}
{{ vlan }},{{ mac }},{{ interface }},{{ to_parse_mac_address_table.vlans[vlan].mac_addresses[mac].interfaces[interface].entry_type }}
{%-             endfor %}
{%-         endfor %}
{%-     endfor %}
{%- else %}
{%-     if filetype_loop == 1 %}
# Show MAC Address-Table
| VLAN | MAC Address | Interface | Entry Type |
| ---- | ----------- | --------- | ---------- |
{%-         for vlan in to_parse_mac_address_table.vlans %}
{%-             for mac in to_parse_mac_address_table.vlans[vlan].mac_addresses %}
{%-                 for interface in to_parse_mac_address_table.vlans[vlan].mac_addresses[mac].interfaces %}
| {{ vlan }} | {{ mac }} | {{ interface }} | {{ to_parse_mac_address_table.vlans[vlan].mac_addresses[mac].interfaces[interface].entry_type }} |
{%-                 endfor %}
{%-             endfor %}
{%-         endfor %}
{%-     else %}
{%-         if filetype_loop == 2 %}
<html><body>
<h1>Show MAC Address-Table</h1>
<table>
  <thead>
  <tr>
    <th>VLAN</th>
    <th>MAC Address</th>
    <th>Interface</th>
    <th>Entry Type</th>
  </tr>
  </thead>
  <tbody>
{%-             for vlan in to_parse_mac_address_table.vlans %}
{%-                 for mac in to_parse_mac_address_table.vlans[vlan].mac_addresses %}
{%-                     for interface in to_parse_mac_address_table.vlans[vlan].mac_addresses[mac].interfaces %}
  <tr>
    <td>{{ vlan }}</td>
    <td>{{ mac }}</td>
    <td>{{ interface }}</td>
    <td>{{ to_parse_mac_address_table.vlans[vlan].mac_addresses[mac].interfaces[interface].entry_type }}</td>
  </tr>
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
  </tbody>
</table>
</body></html>
{%-         else %}
# Show MAC Address Table
{%-             for vlan in to_parse_mac_address_table.vlans %}
## {{ vlan }}
{%-                 for mac in to_parse_mac_address_table.vlans[vlan].mac_addresses %}
### {{ mac }}
{%-                     for interface in to_parse_mac_address_table.vlans[vlan].mac_addresses[mac].interfaces %}
#### {{ interface }}
##### Entry Type: {{ to_parse_mac_address_table.vlans[vlan].mac_addresses[mac].interfaces[interface].entry_type }}
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%-         endif %}
{%-     endif %}
{%- endif %}