Suppose that the output of a jq command is a list of objects. What would be the command to get this list as the attribute of an object? That is: transforming the output from a list into an object.
Example JSON list:
[
{"name":"Foo"},
{"name":"Bar"}
]
Example desired output object:
The attribute "items" has been added, and contains the list that serves as input.
{
"items": [
{"name":"Foo"},
{"name":"Bar"}
]
}