I am trying really hard to get the Windows shell working with jq and failing miserably.
I want this type of thing to work
echo '["a","b","c"]' | .\Downloads\jq.exe -r '{ "data": map({ "{#SNAME}": . })}'
But I get an error:
jq: error: syntax error, unexpected '.' (Windows cmd shell quoting issues?) at , line 1:
If i just do echo '["a","b","c"]' | .\Downloads\jq.exe -r '.'
then it's happy but as soon i i add in other characters such as echo '["a","b","c"]' | .\Downloads\jq.exe -r '{.}'
then it fails again with:
jq: error: syntax error, unexpected '.' (Windows cmd shell quoting issues?) at , line 1:
Does anyone know how to make Windows shell happy with jq for the above examples to work as expected ?
Using latest 1.6 build from jq website for these tests and confirmed the jq commands work using Linux and jqplay.org.
Thank you.