I am working with an Angular typescript file and I have a constant defined as follows:
const baseMaps = {
Map: "test 1",
Satellite: "test 2"
};
Now, I want to set the member names "Map" and "Satellite" dynamically. The approach below won't work but I am looking for a solution similar to this:
const mapText = "Map";
const baseMaps = {
mapText : "test 1",
Satellite: "test 2"
};
Could someone please help me with this problem?