This seems like something really simple and i'm just missing something but how do i return the correct Enum based on the string Index ?
Enum
export enum Locales {
English = "en",
China = "0",
Nigeria = "1",
Kenya = "2"
}
I just want to return Locale.Kenya when all i have is the string "2"
I've had a look at Object.values and Object.keys but didn't understand how to get the Enum back.