title: powershell for parsing json and merging it into an xml file
body: <p>In powershell 5.0,  how to extract the &quot;result&quot; array of a dynamic <code>JsonToExtract.json</code> and uniquely-append the extracted values to be <code>&lt;members&gt;</code> beneath <code>&lt;name&gt;TargetName&lt;/name&gt;</code> in an existing <code>file.XML</code>?  See below for the file structures and what Im trying to achieve.  Thanks in advance for the help!</p>
  <p><strong>JsonToExtract.json</strong></p>
  <pre><code>  {
        &quot;status&quot;: 0,
        &quot;result&quot;: [
          &quot;car&quot;,
          &quot;bike&quot;,
          &quot;wheel&quot;,
          &quot;door&quot;,
          &quot;fish&quot;,
          &quot;mountains&quot;
        ]
      }
  </code></pre>
  <p><strong>file.xml (before merging)</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;Package xmlns=&quot;http://*&quot;&gt;
    &lt;types&gt;
      &lt;name&gt;Weather&lt;/name&gt;
      &lt;members&gt;Cloudy&lt;/members&gt;
    &lt;/types&gt;
    &lt;types&gt;
      &lt;name&gt;TargetName&lt;/name&gt;
      &lt;members&gt;car&lt;/members&gt;
    &lt;/types&gt;
    &lt;version&gt;48.0&lt;/version&gt;
  &lt;/Package&gt;
  </code></pre>
  <p><strong>file.xml (Here is what i expect)</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;Package xmlns=&quot;http://*&quot;&gt;
    &lt;types&gt;
      &lt;name&gt;Weather&lt;/name&gt;
      &lt;members&gt;Cloudy&lt;/members&gt;
    &lt;/types&gt;
    &lt;types&gt;
      &lt;name&gt;TargetName&lt;/name&gt;
      &lt;members&gt;car&lt;/members&gt;
      &lt;members&gt;bike&lt;/members&gt;
      &lt;members&gt;wheel&lt;/members&gt;
      &lt;members&gt;door&lt;/members&gt;
      &lt;members&gt;fish&lt;/members&gt;
      &lt;members&gt;mountains&lt;/members&gt;
    &lt;/types&gt;
  &lt;version&gt;48.0&lt;/version&gt;
  &lt;/Package&gt;
  </code></pre>