I wrote a Java service that returns an observable map
[...]
.then(
(response: Package) => {
response.activityMap.forEach((key: string, value: Map<string, number>) => {
//perform some actions
});
}
)
[...]
The Package type has the following parameters:
export interface Package{
diagnostic?: Diagnostic;
activityMap?: { [key: string]: { [key: string]: number; }; };
}
My goal is to use forEach to loop through the "father" map and perform actions for each key.//dosomething
But I'm encountering an error when trying to use forEach:
This expression is not callable. Type '{ [key: string]: number; }' has no call signatures.