title: How to pass Json variable to command line task in Azure DevOps pipeline?
body: <p>I am populating a pipeline variable in Powershell task and it is getting populated successfully:</p>
  <pre><code>    $env:RESULTJSON=$json
  Write-host &quot;##vso[task.setvariable variable=testJSON]$json&quot;
  </code></pre>
  <p>However, when I try to use it to pass the value in a command line task I am not able to do so:</p>
  <pre><code>    task: CmdLine@2 
      env:     
        InputJSON: $(testJSON)    
      inputs:      
      script:
          echo %INPUTJSON%        
          'jsonProcessor.exe $(Build.BuildID),%INPUTJSON%'    
      workingDirectory: './jsonProcExe/'
  </code></pre>
  <p>I am getting just &quot;{&quot; in testJSON instead of the whole JSON value.</p>