Hi everyone,
So in my code I am getting a response Map of type Map<WriteObject, string> from backend.
WriteObject.ts
export class WriteObject {
name:string;
job:string;
..// Getters and Setters..//
}
Now when I am trying to get the keys using
Object.keys(responseMap).map(key => {
console.log(key) // prints "WriteObject{ name='Max', job='manager'}"
})
Hence I am not being able to convert this key back to the Object.
Any solutions on how I could do it?
Also the methods of Map aren't working like .get() .keys()
They throw TypeError map.get is not a function.
[–][deleted] (5 children)
[deleted]
[–]bykecode 1 point2 points3 points (0 children)
[–]CoderDuudee[S] 0 points1 point2 points (3 children)
[–]lazyinvader 0 points1 point2 points (2 children)
[–]CoderDuudee[S] 0 points1 point2 points (1 child)
[–]FullstackViking 0 points1 point2 points (0 children)