I want to display data in the table using flask forloop.
I have the Following Array called "mainarray"
[
('x', 'y', 'z'),
('a', 'b', 'c'),
('m', 'n', 'o')
]
Currently, I am using following method
{% for newmainarray in mainarray %}
<td>{{ newmainarray [0] }}</td>
<td>{{ newmainarray [1] }}</td>
<td>{{ newmainarray [2] }}</td>
{% endfor %}
Currently, it's working for me, but I have seen in some tutorials that we can display data by using {{newmainarray.keyname}}.
However, it's not working for me. I will be very thankful if anyone can help me with this.