February 18, 2018
Shell:jq 循环 json 对象, jq 循环 json 数组, jq 用法实践, jq converts a JSON object to key=value, jq parses one field from an JSON array into bash array
1. 转换数字为字符串 How do I use jq to convert number to string?
Given the following jq command and Json:
jq '.|[.string,.number]|join(": ")' <<< '
[
{
"number": 3,
"string": "threee"
},
{
"number": 7,
"string": "seven"
}
]
'
I’m trying to format the output