I need to transform this simple JSON array:
["169","19","33"]
to a more complicated JSON object for each item, like:
{
"groups": [
{
"groupid": 169
},
{
"groupid": 19
},
{
"groupid": 33
}
]
}
Currently, I do this using tools not designed for JSON, like sed, awk & whatever Unix tool β itβs dirty for that β and I fail to use JQ.
Is it possible to use a more elegant solution to transform a JSON array to a JSON object with JQ?