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 use not designed JSON tool for that, like sed, awk & whatever Unix tool - it's dirty for that - , and I fail to use JQ.
It's possible to use more elegant solution to transform JSON array to JSON Object with JQ ?
Best regards,