title: SwiftUI pick a value from a list with ontap gesture
body: <p>i'm try to pick some value from a swiftUI list with the ontapGesture.</p>
  
  <p>I have a Searchlist of item, the user need to choose one item and then the app will send the choice to an array that later will be use for other info.</p>
  
  <p>now my problem is how do I do that? how can do it? 
  as you can see from the code below, I want to pick the value of the item.icaoAirport corresponding to that raw and pass to an array.</p>
  
  <pre><code> List(dm.vettoreAeroporti.filter{
                  //                    $0.icaoCode.contains(searchTerm)
                  $0.icaoAirport.localizedCaseInsensitiveContains(searchTerm)
              }) { item in
                  HStack {
                      Text(item.icaoAirport).bold()
                      Spacer()
                      Text(item.nameAirport)
  
                  }
              }
              .onAppear {
                  DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
                      self.dm.openFileJson(fileName: "data")
                  }
              }
              .onTapGesture {
                  // ?? I need to take the value of the item.icaoAirport corresponding to that raw
  
              }
  </code></pre>
  
  <p>thanks in advance for the help. </p>