I need to get data from API using GET method. Actually, I need "noPage", "totalPage" , "List":[]
This is the response from API
{
"status": {
"code": 0,
"message": "Success."
},
"noPage": 5,
"totalPage": 9,
"List": [
{
"_id": "CFB2D5FFDFDADDB954404BF1B9D59844",
"createdDate": "2019-06-25T08:42:27.799+0000",
"createdBy": "Josh",
"enable": "true",
"remarks": null,
"Id": "0044",
"Name": "Trisya"
]
}
Then I'm using this method to get data
Service
getService(): Observable<any> {
const urls: string = `http://192.168.0.101:9080/project/api/listall/${Id}`
return this.http.get<AgentDetails>(urls).pipe(map(res => res['List']));
}
I only success get data in "List": [] only not "noPage"and "totalPage"
How I need to do to get "noPage"and "totalPage"
Hope you all can help
Thanks in advance