title: How to Get key value pair tuple array in swift?
body: <p>I have pairs tuple array pickerDataVisitLocation.just I want to know how to return key value pair location from my array using uniqId ex 204 </p>
  
  <pre><code>var pickerDataVisitLocation:[(uniqId:Int,location:String)] = [(203,"Home"),(204,"Hospital"),(205,"Other")]
  var selectedIndex = pickerDataVisitLocation[1].uniqId
  pickerDataVisitLocation[selectedIndex].location //&lt;--fatal error: Index out of range
  </code></pre>