I would like to find the first EKSource of type EKSourceType.Local with a \"single\"-line expression in Swift. Here is what I currently have:
EKSource
EKSourceType.Local
Swift 4 solution that also handles the situation when there are no elements in your array that match your condition:
if let firstMatch = yourArray.first{$0.id == lookupId} { print("found it: \(firstMatch)") } else { print("nothing found :(") }