Imagine I have a map data type
exampleMap: Map<string, any>
The key in the map is always a string, and the corresponding value is an object.
This object might look like this:
{ name: 'sampleName', age: 30}
Now, let's say the user selects an element using a dropdown menu.
How can I change the name property of the object to match its key in the map?
I've already tried iterating over the map with forEach and using Map.get() and Map.set(), but it didn't work as expected.