【发布时间】:2017-11-17 01:49:36
【问题描述】:
cat test.json | jq 'map(if ParameterKey == "Project" then . + {"ParameterValue" = "jess-project"} else . end )'
jq: error: syntax error, unexpected '=', expecting '}' (Unix shell quoting issues?) at <top-level>, line 1:
map(if ParameterKey == "Project" then . + {"ParameterValue" = "jess-project"} else . end )
jq: 1 compile error
【问题讨论】:
-
我在尝试在 PowerShell 中运行
jq 'map(if ParameterKey == "Project" then . + {"ParameterValue" = "jess-project"} else . end )'时遇到与Windows cmd shell quoting issues?相同的错误,所以我认为这不是 shell 引用问题。 -
在 LINUX 中遇到这个问题
标签: syntax-error jq