when I did
loadPeople(){
this.myService.load().then(data => {
this.people = data;
alert(this.people);
});
}
it alerts json as :
{
"status": "true",
"statusCode": 200,
"response": [{
"user_id": "92",
"firstname": "joy",
"lastname": "Panchal",
"email": "[email protected]",
"password": "7Y7+K0vZIVWPDUQH++Iu+/+tMZ",
"user_type_id": "1"
}, {
"user_id": "89",
"firstname": "mark",
"lastname": "haris",
"email": "[email protected]",
"password": "4JICqnTkR8ysTI+nQQ+rpfAf7e",
"user_type_id": "1"
}]
}
now i am trying to access "response" by
loadPeople(){
this.myService.load().then(data => {
this.people = data.response;
alert(this.people);
});
}
but it alerts as "undefined" .
can anyone tell where i am missing ??