I have written code like below
getCalculatedValuesViaGet = (myData): Observable < RmdResponse > => {
return this._http.get('https://jsonplaceholder.typicode.com/posts',
{ headers: this.getHeaders })
.map((response: Response) => response.json())
.map(x => { x.title = x.title + "hello world" })
.catch(this.handleError);
}
Basically i want to append some extra info to each object returned from http method. My understanding is that first map converts it to JSON object. Second object should pass each object inside array and make the updation. But whole object is passed to second map method rather than each individual object. Looks like my understanding is wrong.