I have this array of arrays:
[['Frutta',
['M01', '2018-08-06 08:35:00', '2018-08-06 10:13:00'], ['M02',
'2018-08-06 10:18:00', '2018-08-06 11:42:00'], ['M04', '2018-08-06 15:19:00',
'2018-08-06 16:37:00']],
['verdura',
['M01', '2018-08-06 08:35:00', '2018-08-06 10:25:00']]]
and I want to print each field
so, with flask I tried like this:
{% for prodotto in range(inserisci_ordine[1]| length) %}
{{ inserisci_ordine[prodotto][0] }}<br>
{% for macchine in range(inserisci_ordine[prodotto]| length) %}
{{ inserisci_ordine[prodotto][macchine] }}<br>
{{ inserisci_ordine[prodotto][macchine][2] }}<br>
{% endfor %}
{% endfor %}
I would like to print something like this:
frutta
M01, 2018-08-06 08:35:00, 2018-08-06 10:13:00M02, 2018-08-06 10:18:00, 2018-08-06 11:42:00M04, 2018-08-06 15:19:00, 2018-08-06 16:37:00
verdura
M01, 2018-08-06 08:35:00, 2018-08-06 10:25:00
But I can't figure it out..
EDIT.
Is it possible in some way, print also the machine utilized in the previous cycle? for example:
frutta
M01, 2018-08-06 08:35:00, 2018-08-06 10:13:00#I want to print here, NULLM02, 2018-08-06 10:18:00, 2018-08-06 11:42:00#Here the, M01M04, 2018-08-06 15:19:00, 2018-08-06 16:37:00#here the, M02
verdura
M01, 2018-08-06 08:35:00, 2018-08-06 10:25:00#here, NULL