How to map Response from service when service is returning Map | Angular

Viewed 32

I have been working on angular4 for a while, handling JSON response from service. But today I observed my service returning me response like this.

info-response.json

{
project: "school management",
class: "X-A"
"student1":{
     "id":"1",
     "name":"Anna"
    },
"student2":{
     "id":"2",
     "name":"Martin"
    }
}


how can i model this response and perform operation. as Student1 and Student2 are keys of map and it can extend upto StudentN

0 Answers
Related