Appending | to each line and a last line . is a jq program that reproduces the original json.
jq -r '
( tostream
| select(length > 1)
| (
.[0] | map(
if type == "number"
then "[" + tostring + "]"
else "." + .
end
) | join("")
)
+ " = "
+ (.[1] | @json)
+ " |"
),
"."
'