title: How to change value of object in angular
body: <p>I have service like this :</p>
  <pre><code>getLastStatus(id): Observable&lt;string&gt; {
          let url_detail = this.apiurl + `/${id}`;
          return this.http.get&lt;any&gt;(url_detail, this.httpOptions).pipe(
              map(data =&gt; {
                  var status = data['data'].reduce((item, curr) =&gt; {
                      return item.id &lt; curr.id ? curr : item;
                  }).status.title;
  
                  return status;
  
              }),
              catchError(this.handleError)
          );
      }
  
  
  getData(){
          return this.http.get&lt;DataModel[]&gt;(this.apiurl, this.httpOptions).pipe(
              tap(data=&gt; {
                  data.map(d=&gt;{
                      this.getLastStatus(d.id).subscribe(s=&gt;{
                          d.status = s;
                      });
                  });
              }),
              catchError(this.handleError)
          );
      }
  </code></pre>
  <p>I want to update value of status from the result of json object. But, when I subscribe getData() like this, the value of status not updated.</p>
  <pre><code>this.myService.getData().subscribe(data=&gt;{
        console.log(data)
        data.map(d=&gt;{
           console.log(&quot;status &quot;, d.status) //value of status not updated
        })
      });
  </code></pre>
  <p>What's should i do with my code? Any suggestion?</p>