title: How to change url in long JSON value using powershell?
body: <p>I have a JSON file :</p>
  <pre><code>&quot;scripts&quot;:  {
                  &quot;lint&quot;:  &quot;./node_modules/.bin/eslint ./ --config .eslintrc.json&quot;,
                  &quot;test:ui:start-local-x-run&quot;:  &quot;./node_modules/.bin/protractor ./configs/protractor/local_run.conf.js --disableChecks --feurl http://website.com --beurl http://172.34.34.34:3000 --feadminurl http://website.com/ap/users --db name --env STG&quot;
  
              }
  </code></pre>
  <p>I need to change --feurl --beurl --feadminurl --db --env using powershell.</p>
  <p>I've tried to use the function but it changes full value:</p>
  <pre><code> function Update-JsonParameter($directory, $jsonFile, $property, $subproperty, $value)
  {
  try
  {
  write-host &quot;Update $property.$subproperty property in JSON file $directory\$jsonFile&quot;
  $jsonFile = &quot;$directory\$jsonFile&quot;
  $convertJson = Get-Content -Raw -Path $jsonFile | ConvertFrom-Json
  $convertJson.$property.$subproperty = &quot;$value&quot;
  $convertJson | ConvertTo-Json | set-content $jsonFile
  }
  catch
  {
  write-host &quot;Updating JSON file FAILED!&quot;
  throw $Error[0].Exception
  }
  }
  </code></pre>
  <p>How can I implement it?</p>