You can use computable property, like
struct Pokemon: Decodable, Identifiable { var id: Int { nr } // << here !! let nr: Int let name: String let imageUrl: String let type: String}