title: How to merge two json documents in json.net?
body: <p>I'm not sure of the correct terminology as not overly knowledgeable about json. I have an existing json string/object of the following fixed format (i.e. all items are at the root level and of straightforward key/value pairs, although the number of items can vary):</p>
  <pre><code>{
    &quot;product_id&quot;: &quot;1777&quot;,
    &quot;license_key&quot;: &quot;ECHOES-SILENCE-PATIENCE-AND-GRACE&quot;,
    &quot;valid_for&quot;: &quot;365&quot;,
    &quot;status&quot;: &quot;active&quot;,
    &quot;times_activated_max&quot;: 1
  }
  </code></pre>
  <p>I need a way to add a json string of varying schema/format that is passed into a method. This object can be of any json format. It's to be added to the root. For example adding this:</p>
  <pre><code>{
  &quot;name&quot;:&quot;John&quot;,
  &quot;age&quot;:30,
  &quot;cars&quot;:[&quot;Ford&quot;, &quot;BMW&quot;, &quot;Fiat&quot;]
  }
  </code></pre>
  <p>..will become this:</p>
  <pre><code>{
    &quot;product_id&quot;: &quot;1777&quot;,
    &quot;license_key&quot;: &quot;ECHOES-SILENCE-PATIENCE-AND-GRACE&quot;,
    &quot;valid_for&quot;: &quot;365&quot;,
    &quot;status&quot;: &quot;active&quot;,
    &quot;times_activated_max&quot;: 1
    &quot;name&quot;:&quot;John&quot;,
    &quot;age&quot;:30,
    &quot;cars&quot;:[&quot;Ford&quot;, &quot;BMW&quot;, &quot;Fiat&quot;]
  }
  </code></pre>
  <p>I have Newtonsoft.Json at my disposal for this.</p>
  <p>I did read <a href="https://stackoverflow.com/questions/45992994/how-to-merge-two-json-objects-using-json-net">this</a> but couldn't map it to my problem.</p>
  <p>Hope someone can help</p>