Let\'s say I have a Python variable:
list_of_items = [\'1\',\'2\',\'3\',\'4\',\'5\']
and I pass it to Jinja by rendering HTML, and I also h
Make some invisible HTML tags like etc. and name its id, and the class name is a pattern so that you can retrieve it later.
Let you have two lists maintenance_next[] and maintenance_block_time[] of the same length, and you want to pass these two list's data to javascript using the flask. So you take some invisible label tag and set its tag name is a pattern of list's index and set its class name as value at index.
{% for i in range(maintenance_next|length): %}
{% endfor%}
Now you can retrieve the data in javascript using some javascript operation like below -