title: How do I filter a list using the search bar in swiftui
body: <p>How do I filter a list using a search bar in SwiftUI.</p>
  <p>This is what I have done so far, it shows all the information in the list but the list does not filter the information.</p>
  <pre><code>ForEach(
    (0..&lt;self.appData.myJobs.count).filter(
      { &quot;\($0)&quot;.contains(searchBar.text) || searchBar.text.isEmpty  }), 
    id: \.self) { index in
  </code></pre>
  <p>Thanks.</p>