title: SwiftUI how to remove duplicates from ForEach array
body: <p>I'm working on an array of filters which are connected to a database. The filters (categories in this case) are successfully rendered. However, there are many duplicates. I'm new to SwiftUI and I'm eager to know if there's any smart way to remove duplicates in my foreach.</p>
  <p>Hope someone can help me! Thanks in advance!</p>
  <p>Find the code below:</p>
  <pre><code>{
    HStack(spacing: 8){
      ForEach(artikel.content) { filter in
          FilterButton2_0(selected: self.$selected, name: filter.categorie ?? &quot;&quot;, selectedFilter: self.$selectedFilter)
                       }
                    }.padding(.leading, 20)
                }
  </code></pre>