When using the following example from this question https://stackoverflow.com/a/48801628/3233462
jq -c .[] input.json | awk '{print > "doc00" NR ".json";}
I get the following error:
I am a newbie to Powershell/jq/awk but all google searches point to using jq as the best way to resolve this.
Can anyone explain why I am getting this error and what I need to do to resolve it. It seems like a simple syntax error (maybe . needs escaping?). Nothing I have tried has resolved the issue.
To add some context, I have a json file with 2000+ objects in an array. I am trying to separate these using jq - this part seems to work. Then I am trying to output them to files (ideally named with the "name" property of each object) using awk.