When calling a REST endpoint, the return type is as follows:
ResponseEntity<Map<String, List<Object>>>
How can I handle this response on the Angular side?
I attempted the following approach:
let requiredData = new Map<String, Array<Object>>();
this.service.getMap().subscribe((mapData) => {
requiredData = mapData;
}
I am able to successfully log this in the console. However, when I try to retrieve items from the map or fetch keys as shown below, it always returns undefined
requiredData.keys
Does anyone know what the issue might be here?