Dato il seguente comando JQ e JSON:Come si usa jq per convertire il numero in stringa?
jq '.[]|[.string,.number]|join(": ")' <<< '
[
{
"number": 3,
"string": "threee"
},
{
"number": 7,
"string": "seven"
}
]
'
Sto cercando di formattare l'output come:
three: 3
seven: 7
Purtroppo, il mio tentativo è risultato il seguente errore:
jq: error: string and number cannot be added
Come si converte il numero in stringa in modo che entrambi possano essere uniti?