title: How to create CSV output from JSON?
body: <p>My JSON query returns weather data that I would like to parse using powershell. I want to delete all unnecessary items and export the final file to CSV or txt.</p>
  
  <pre class="lang-psh prettyprint-override"><code>$json = Get-Content -Raw $path | ConvertFrom-Json #get JSON object from directory and convert to powershell object
  $hourly = $json.hourly_forecast
  $FCTTIME = $hourly.FCTTIME
  $pretty = $FCTTIME | Select pretty
  
  $temp = $hourly.temp
  $eng = $temp | Select english
  
  $parsed = $eng, $pretty
  </code></pre>
  
  <p>It seems to work okay but when I output <code>$parsed</code> in CSV it has the object properties rather than the values of <code>$eng</code> and <code>$pretty</code>. Is there any easier way to parse JSON files or another way I can combine the arrays in the last step?</p>