I'm using Angular 4, I've made a call to an api which returns an array of objects.
Then I tried to get specific data by referencing res.name but for some reason I get undefined so I tried res[0]name and res['name'] which returns only the first name but I want all the names from the array.
Here is my array:
[{"name":"joey","surname":"jackson","email":"[email protected]","phone":"0815342119"},
{"name":"Tim","surname":"Muller","email":"[email protected]","phone":""},
{"name":"Kim","surname":"Van Dam","email":"[email protected]","phone":""},
{"name":"Lyn","surname":"Davids","email":"[email protected]","phone":""}]