Given the key STEPS.GENDER
and the string enum below
export enum STEPS {
NAME = "name",
GENDER = "gender",
BIRTHDAY = "birthday",
SUCCESS = "success"
}
Is there a way to programmatically determine the next or previous key in the enum, such as STEPS.BIRTHDAY
and STEPS.NAME
in this particular case?
Note: Or any other key related to the current key where the relationship can be defined. If no matching key is found, return undefined
.