My messages generator output
$ ./messages.sh
{"a":"v1"}
{"b":"v2"}
{"c":"v3"}
...
Required output
$ ./messages.sh | jq xxxxxx
[{"a":"v1"},{"b":"v2"}]
[{"c":"v3"},{"d":"v4"}]
...
>Solution :
Take the first item using ., and the second using input. Wrap them both into array brackets, and provide the -c option for compact output. jq will work through its whole input one by one (or two by two).
./messages.sh | jq -c '[., input]'
[{"a":"v1"},{"b":"v2"}]
[{"c":"v3"},{"d":"v4"}]