在字典中搜寻

我有简单的字典:

    struct AnnotationDict: Encodable, Decodable {
            let id: Int
            let index: Int
    }
      
    var sortedAnnotation: [AnnotationDict] = []

    let ADict = AnnotationDict(id: 1, index: 2)
    sortedAnnotation.append(ADict)

如何从id = 1的AnnotationDict搜索中获取索引?