title: How can i manipulate an object while inside of a loop
body: <p>So i m trying to manipulate the object while going through the loop.
  Well, its not working.. How can i make it work so the const <code>patient</code> has the property <code>lastActivity</code> inside of the <code>this.model</code> array?  </p>
  
  <p>javascript:</p>
  
  <pre><code>for (const item of data) {
    const patient = this.model.find(
       x =&gt; x.linkedUserId === item.userId
    );
    if (patient) {
      patient.lastActivity = item.lastUploadDate;
    }
  }
  </code></pre>