how to deference data from registered variables with loop

I am trying to process a list of subfolders, but am having trouble dereferencing the data
If I run the following playbook

loop takes a list and folders.files.filename is not a list but folders.files is so change to this

  - debug:
      msg: "{{ item.filename }}"
    loop: "{{ folders.files }}"

Thanks Kai!!!
That worked perfectly.