title: Javascript appending an object to an object
body: <p>I'm new to Javascript and Im having a hard time trying to figure the following out. I need to append a javascript object to the end of another javascript object. I know the preferred way to do this is to store it in an array and use <code>.push</code> but that does not work for my use case as I need the format of the JSON to stay the way it is and not add the <code>[]</code> when doing the push method.</p>
  <p>Below is my javascript:</p>
  <pre><code>var hours_json = 
  {
    &quot;type&quot;: &quot;COLUMN&quot;,
    &quot;properties&quot;: {
      &quot;span&quot;: 2
     },
     &quot;children&quot;: [
       {
         &quot;rest of the code here&quot;
       },
     ],
   };
   var hours_part_2 = {
     &quot;type&quot;: &quot;COLUMN&quot;,
        &quot;properties&quot;: {
           &quot;span&quot;: 10,
         },
         &quot;children&quot;: [],
   };
  </code></pre>
  <p>I want to append <code>hours_part_2</code> to the end of <code>hour_json</code> and for the output to look like:</p>
  <pre><code>{
    &quot;type&quot;: &quot;COLUMN&quot;,
    &quot;properties&quot;: {
      &quot;span&quot;: 2
     },
     &quot;children&quot;: [
       {
         &quot;rest of the code here&quot;
       },
     ],
   },
   {
     &quot;type&quot;: &quot;COLUMN&quot;,
        &quot;properties&quot;: {
           &quot;span&quot;: 10,
         },
         &quot;children&quot;: [],
   },
   &quot;rest of code&quot;
  </code></pre>
  <p>Thanks for looking!</p>