I call the function
getAllUsers() {
return this.http.get(this.url);
}
with:
this.UserService.getAllUsers().subscribe(res => {
console.log(res);
})
The output is:
[{id:1, name:'anna'}, {id:2, name:'john'}, {id:3, name:'victor'}]
but I would like to return an array of all names:
['anna', 'john', 'victor']
Does anyone have an idea how to do that?