Jinja2 iterate over strings and lists

Hi guys,
I got a question concerning list of lists and strings.

I have something like :
- name: test
  vars:
    test1: "test1"
    test2:
      - "test21"
      - "test22"
    test3:
     - "{{ test1 }}"
     - "{{ test2 }}"
      
  debug:
    msg: "{% for tt in test3 %} {{ tt }} {% endfor %}"

Is there a way to flatten the list into à list of strings with a filter ?

Use filter "flatten". For example

    - debug:
        msg: "{{ test3|flatten }}"

should give

    "msg": [
        "test1",
        "test21",
        "test22"
    ]

HTH,

  -vlado

Thanks, that's thé filter I looking for.
Have a nice nice day !