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 as:
three: 3
seven: 7
Unfortunately, my attempt is resulting in the following error:
jq: error: string and number cannot be added
How do I convert the number to string so both can be joined?