I am trying to understand the map() operator of RxJS.
Below is one of the example with works as expected. In this example all names will be appended with text student one by one.
studentArray:string[]=['sam','robert','lisa'];
from(this.studentArray).pipe(map((s:string)=>s=s+' student')).subscribe(d=>console.log(d));
Now I have below sample code. With this code I am calling a service which returns array of ToDo objects. What I am trying to do is the iterate each ToDo object and return the updated object
But when I do so it gives an error and reason for the error is data variable in the map operator. With above example map operator is not getting single element of an array of ToDo but the entire array is being passed to the map.
Am I doing something wrong here?
Edit: Updated image.

.pipe(map(data => data.title + 'append')).subscribe(...)without the assignment. Also themappipe is going to give your an array. If you want to map the array items you have to do.pipe(map(data => data.map(item => ....)))inside the map pipe.like this) only needs single backticks. A "code fence" of three backticks is only needed for block formatting.