Hi I want to show the highest three participant’s rating however the next codes doesn’t work despite the fact that the primary factor will be accessed. That will be nice if you happen to may assist. Thanks.
struct ContentView: View {
@Question(kind: PlayerItem.playerScore, order: .reverse) var playerItems: [PlayerItem]
}
var physique: some View {
// this works
Textual content("Your greatest rating : (playerItems.first?.playerScore ?? 0)")
// this doesn't works
Textual content("Your second greatest rating: (playerItems.second?.playerScore ?? 0)")
// this additionally doesn't works
Textual content("Your second greatest rating: (playerItems.second?.playerScore )")
// this additionally doesn't works
Textual content("Your second greatest rating: (playerItems[1].playerScore )")