In a directory i have few hundred json files. Each file has a json property called qlist that i want to remove from that file.
$files = Get-ChildItem "...path...\*.json"
foreach($file in $files)
{
.\jq.exe 'del(.qlist)' $file | Out-File -FilePath $file
}
the jq part works fine, but i cannot figure out how to write output of jq into a file, code above prunes all json files for me.
For example if i would be on a llinux os would simply do
./jq 'del(.qlist)' $file > $file