title: How to add additional elements in an existing json file
body: <p>This is what I am doing:</p>
  <pre><code>$appParametersXml = [Xml] (Get-Content &quot;$appParameterFilePath\$appParameterFile&quot;) 
      $parameterJsonFile = &quot;$appParameterFilePath\$applicationName&quot;+ &quot;.&quot; + $jsonFileName
  
      # Transform the &quot;Parameter&quot; elements into a nested hashtable.
      # Convert any values that can be interpreted as [int] to [int] and strip out any comments in the xml file.
      $hash = [ordered] @{}
      $appParametersXml.Application.Parameters.ChildNodes | Where-Object {$_.NodeType -ne 'Comment'} | % {
      $hash[$_.Name] = @{ value = if ($num = $_.Value -as [int]) { $num } else { $_.Value }
         }
      } 
  
      # Wrap the hashtable in a top-level hashtable and convert to JSON.
      [ordered] @{
      '$schema' = 'https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#'
       contentVersion ='1.0.0.0'
       parameters = $hash
       } | ConvertTo-Json |Out-File $parameterJsonFile
       Write-Host &quot;The JSON File is: &quot; $parameterJsonFile
  </code></pre>
  <p>After I build the hash table with existing information from the XML file, I need to add additional parameter values like this Before converting to JSON</p>
  <pre><code>&quot;parameters&quot;:  {
                 &quot;applicationName&quot;:  {
                          &quot;value&quot;:  &quot;somevalue&quot;
                                             },
                 &quot;applicationTypeName&quot;:  {
                           &quot;value&quot;:  &quot;somevalue&quot;
                                                 },
                  &quot;applicationTypeVersion&quot;:  {
                            &quot;value&quot;:  &quot;somevalue&quot;
                    },
  </code></pre>
  <p>Everything that I have tried so far has given me this as additional values. The regular XML values are being converted the correct way but the additional items that I am adding before converting are coming up like this!</p>
  <pre><code>&quot;applicationName&quot;:  &quot;somevalue&quot;
  
  </code></pre>
  <p>How can i seperate that out on different lines?</p>