how can i do this in jinja condition
My goal is to check the value of value_index every index of the loop if the next index value is same then it will not print . until the next value is not equal to value_index it will print it.
sample data:
users = [ ('username1','password1'),('username2','password1') ]
contacts = [('0909','0909','0011','0011','0011','0908')]
so far i have this code but its not working as i expected
{% for items in users %}
{% set i = loop %}
{% set value_index = '' %}
{% print(items[0]) %}
{% for item in contacts %}
{% if value_index != item %}
{% print(item) %}
{% endif %}
{% set value_index = item %}
{% endfor %}
{% endfor %}
My expected output is
username1
0909
0011
0908
username2
0909
0011
0908