How would i be able to iterate over a list of different files (in a certain directory) and filter across a List, then if the certain string is found it would return the file it found it in.
Eg: Files are '344-444.yml, 555-646.yml and 996-666.yml
File 344-444.yml contains:
hobby:
- football
- hockey
- custom
if custom is found, the first match it finds to return the file name, eg 344-444.yml
.
Thanks!