How can I render Table MultiSelect items in a Jinja template

I have a field that is of the type “Table MultiSelect” and I want to print the content inside it. But if I try this it returns an empty array.

{{ doc.list }}

result:
[]

If I try to loop through the items, it doesn’t show anything.

    {%- for item in doc.list -%}
       <span> {{ item }} </span>
    {%- endfor -%}

result:


nothing…

You can try approach

{%- for item in doc.list -%}
{{ item.item }}
{%- endfor -%}

Assuming “item” is the field_name for doc.list

It works, thanks! I couldn’t find any docs for it or maybe I didn’t pay attention.