We are using enums for some basic data structures like this:
enum Industry: String {
case Industry1 = "Industry 1", Industry2 = "Industry 2", Industry3 = "Industry 3"
static let allValues = [Industry1, Industry2, Industry3]
}
When we store the values in our database we store them as Ints/numbers. So for example the value for Industry might be 2 which would be Industry2.
How do I map the value 2, back to the relevant item in the enum? So I can retrieve the string value back?