How can I transform a JSON document like this:
{ \"foo\": 123, \"bar\": \"abc\" }
into something like this:
{ \"payload\": { \
You just need to wrap an object around the input.
jq '{payload: .}' some.json