title: Is there any way to append object into the existing array of objects based on the key
body: <p>I am having one json object like below,</p>
  
  <pre><code>let existing_data = [
         {
            "client":[
               {
                  "name":"aaaa",
                  "filter":{
                     "name":"123456"
                  }
               }
            ]
         },
         {
            "server":[
               {
                  "name":"qqqqq",
                  "filter":{
                     "name":"984567"
                  }
               }
            ]
         },
         {
            "server_2":[
               {
                  "name":"Testing_2",
                  "filter":{
                     "name":"567845"
                  }
               }
            ]
         }
      ]
  </code></pre>
  
  <p>This will be dynamic, as of now just gave sample object. If i fill form inputs, will get a object like below,</p>
  
  <pre><code>let input_data =  {
        "client":[
           {
              "name":"aaaa",
              "filter":{
                 "name":"123456"
              }
           }
        ]
      }
  </code></pre>
  
  <p>I need to append this object into the existing "client" json object. Expected output will be like,</p>
  
  <pre><code>[
     {
        "client":[
           {
              "name":"aaaa",
              "filter":{
                 "name":"123456"
              }
           },
           {
              "name":"bbbb",
              "filter":{
                 "name":"456789"
              }
           }
        ]
     },
     {
        "server":[
           {
              "name":"qqqqq",
              "filter":{
                 "name":"984567"
              }
           }
        ]
     },
     {
        "server_2":[
           {
              "name":"Testing_2",
              "filter":{
                 "name":"567845"
              }
           }
        ]
     }
  ]
  </code></pre>
  
  <p>I tried the below method, but it is not working as expected. Some help would be appreciated.</p>
  
  <p>Tried like below and not worked as expected,</p>
  
  <pre><code>existing_data.forEach(function (obj) {
    if(Object.keys(obj) == 'client') {
      let old_values = Object.values(obj['client']);
      let new_values = {old_values,input_data['client']};
     }
  });
      console.log(JSON.stringify(new_values));
  </code></pre>