convert csv to json powershell code

JavaScript
Get-Content -path source.csv | ConvertFrom-Csv -Delimiter ',' | ConvertTo-Json | Out-File output.json  
Source

Also in JavaScript: