I'm trying to convert a Typescript enum value to a number so that in my dropdown it shows the enum string value but on a submit button, the value is passed instead of the string. The enum is set up as below.
As of now I'm able to console.log the key (string) of the object (ex. Value), but what I would like to do is pass the 0 (numeric) value once the object is emitted.
How would I do that?
enum Value {
Value = 0,
Test = 1,
Foo, 2
}