title: How to update the object values inside the object in angular
body: <pre><code>data = [{
      id: 'stud1',
      row: 1,
      currLine: {
          row: 1,
          line: 1
      },
      newLine: {
          row: 1,
          line: 1
      }
  },{
      id: 'stud2',
      row: 2,
      currLine: {
          row: 2,
          line: 2
      },
      newLine: {
          row: 2,
          line: 2
      }
  },{
      id: 'stud3',
      row: 3,
      currLine: {
          row: 3,
          line: 3
      },
      newLine: {
          row: 3,
          line: 3
      }
  }]
  
  
  newData = {
      row: 3,
      line: 3,
      data: { id: 'e1', name: 'edward' },
      section: { id: 's1', name: 'emerald' }
  }
  </code></pre>
  <p>What I'm trying to do here is to update the newLine in the row3.</p>
  <p>the output should be like this.</p>
  <pre><code>[{
      id: 'stud1',
      row: 1,
      currLine: {
          row: 1,
          line: 1
      },
      newLine: {
          row: 1,
          line: 1
      }
  },{
      id: 'stud2',
      row: 2,
      currLine: {
          row: 2,
          line: 2
      },
      newLine: {
          row: 2,
          line: 2
      }
  },{
      id: 'stud3',
      row: 3,
      currLine: {
          row: 3,
          line: 3
      },
      newLine: {
           row: 3,
           line: 3,
           data: { id: 'e1', name: 'edward' },
           section: { id: 's1', name: 'emerald' }
      }
  }]
  </code></pre>
  <p>I tried to use the filter but it always error:</p>
  <pre><code>data.filter((x: any) =&gt; x['row'] === newData['row']);
  data['newLine'] = DATA;
  </code></pre>
  <p>but it errors.</p>