title: Looping through JSON file with PowerShell
body: <p>How do I loop through all items in a JSON file? The current code just writes all names on one big line:</p>
  
  <pre><code>Get-Content -Raw -Path c:\temp\Environments.Generic.json | ConvertFrom-Json | ForEach-Object {
      Write-Host $_.Name
  }
  </code></pre>
  
  <p><strong>json file:</strong></p>
  
  <pre><code>[
     {
        "Name":"EnableRetry",
        "Description":"Enable retry for Webservice Task",
        "Type":"Boolean",
        "Sensitive":false,
        "Value":true
     },
     {
        "Name":"FolderStageFiles",
        "Description":"Location of stage files",
        "Type":"String",
        "Sensitive":false,
        "Value":"d:\\sources\\"
     },
     {
        "Name":"FtpPassword",
        "Description":"Secret FTP password",
        "Type":"String",
        "Sensitive":true,
        "Value":"Welcome1"
     }
  ]
  </code></pre>