In my Angular project, I have a select dropdown that is populated from an array.
- Each entry in the array is in lowercase format.
- The variable "selected" that I use in other parts of my code needs to be in lowercase.
- However, the entries displayed in the dropdown should be in uppercase format.
- When the dropdown is closed, it should show the currently selected entry (in uppercase) with the prefix "VIEWING: "
While I know how to accomplish the first three points using
myValue.toUpperCase() for myValue in myArrayOfValues
, I am unsure on how to tackle the fourth point - either in Angular or with raw JS/jQuery.
Does anyone have a solution for this situation?