Title says it all. So far I get this:
echo '[{"a": "A", "b": "B"}, {"c": "C", "d": "D"}]' | jq '.[] + {x:"X"}'
Which will result to this:
{
"a": "A",
"b": "B",
"x": "X"
}
{
"c": "C",
"d": "D",
"x": "X"
}
but it will not "wrap" the result in array and also does not add comma after each entry.