I have an Enum:
const ingredients = {
BREAD_BOTTOM: 'BreadBottom',
BREAD_TOP: 'BreadTop',
MEAT: 'Meat',
BACON: 'Bacon',
CHEESE: 'Cheese',
SALAD: 'Salad'
};
Now I want to create a list of ingredients using this Enum, something like:
listOfIngredients: {
ingredients.BREAD_TOP: 1,
ingredients.BACON: 1,
ingredients.CHEESE: 2,
ingredients.MEAT: 2,
ingredients.BREAD_BOTTOM: 1,
}
I try some variations such as ${ingredients.BREAD_TOP}
but I cannot make the list of ingredients have as key the Enum values