Answer the question
In order to leave comments, you need to log in
How to parse Json?
[
{
"general": {
"firstName": "Liana",
"lastName": "Crooks",
"avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/kevinoh/128.jpg"
},
"job": {
"company": "Ledner, Johnson and Predovic",
"title": "Investor Functionality Coordinator"
},
"contact": {
"email": "[email protected]",
"phone": "(895) 984-0132"
},
"address": {
"street": "1520 Zemlak Cove",
"city": "New Devon",
"zipCode": "42586-7898",
"country": "Guinea-Bissau"
}
},
{
"general": {
"firstName": "Deontae",
"lastName": "Dare",
"avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/andysolomon/128.jpg"
},
"job": {
"company": "D'Amore, Dicki and Borer",
"title": "International Applications Consultant"
},
"contact": {
"email": "[email protected]",
"phone": "1-615-843-3426 x600"
},
"address": {
"street": "65901 Glover Terrace",
"city": "Alden ton",
"zipCode": "57744-4248",
"country": "Kenya"
}
}
]
getPeople() {
return this.http.get('http://localhost:3000/global');
}
Answer the question
In order to leave comments, you need to log in
An Observable is returned to you - you need to subscribe (subscribe)
Like
spend time - go through https://angular.io/tutorial - basic questions will disappear
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question