Trying to show a single value from duplicates in a horizontal scrollview

For example, The user of my app have entered multiple document entries where the data in the title field is unique but the data in the folder field is the same for all the documents. Title and Folder are the user fields of the document in a collection on Firebase. So I am trying to show a single value when there are repetitive values in a horizontal scrollview. Right now I am using the ForEach control flow statement but it is bringing me the repetitive value for each document that has it. The question is how can I show only one instance of the value meanwhile the other documents have the same value for the same field? Notice I am using Firebase but my struggle is more related to the swiftui view.