Is there any way to update the value of a created key value pair map in angular 4+.
say i have:
testMap: Map<number, string> = new Map<number, string>();
ngOnInit() {
this.testMap.set(1, "A");
this.testMap.set(2, "B");
this.testMap.set(3, "C");
this.testMap.set(4, "D");
this.testMap.set(5, "E");
}
changeValue(id){
//id is the one of the keys of the map whose value needs to be altered
//let say (id=3)
this.testMap.put(id,"ChangedValue"); //PUT is from java
}