title: Angular - how to add detail in nested object?
body: <p>My JSON structure looks like this:</p>
  <pre><code>{
      &quot;id&quot;: 1,
      &quot;name&quot;: &quot;Marks, Price and Conn&quot;,
      &quot;description&quot;: &quot;Newton&quot;,
      &quot;installations&quot;: [
        {
          &quot;id&quot;: &quot;1&quot;,
          &quot;name&quot;: &quot;ENIM&quot;,
          &quot;key&quot;: 106789,
        }
      ]
  }
  </code></pre>
  <p>And when in my angular page I click on the client I want to add an installation. How to get current client values and then add a new object to subarray?</p>
  <p>I tried simple</p>
  <pre><code>export class AddInstallationComponent implements OnInit {
    clients: any;
    client = {
      name: '',
      nip: '',
      description: '',
  
    installation: [{
      name: '',
      key: '',
    }]
   };
  
    constructor(private clientService: ClientService) { }
    saveInstallation(): void {
  
      const data = {
  
        name: this.client.installation['name'],
        key: this.client.installation['key'],
  
      };
  
      this.client.installation.push(data)
  
    }
  }
  </code></pre>
  <p>But I don't know how to get values for my current client which I clicked.</p>