Looking to show one value in a forEach loop when there are multiple equal value in a data

I am using Firebase to save the data for my app. When a document is created in Firebase, one of the document fields can be used like a label across different documents. So I would like to show this label only once in a horizontal scrollview. Although each document could have the same value in this field. Right now when I call the data from firebase the horizontal scrollview shows the value for each document that has the same field. I am looking to show it only once when the field for each document have equal values. Thank you for your help!