{% for k,v in enumerate(data['gateway']) %}
    {% if data['device'] and v['id'] in data['device'] %} {% for d in data['device'][v['id']] %}
  • {% end %} {% end %}
{% end %}