How to use @FetchRequest in order to retrieve a single object rather than a FetchedResults<Card>? I only need a single object in my view. Is there an alternative way to perform a query and get a single object based on a unique attribute value, for example an ID?
struct MyCardsView: View {
@FetchRequest(entity: Card.entity(), sortDescriptors: []) var cards: FetchedResults<Card>
var body: some View {
List{
ForEach(cards){
....
}
}
}
}