Closed
Description
What would you like to be added:
The output.to
field allows to write data to the context. Is the context merged or overwritten by the data produced by this expression?
given a context of
{
"foo": "bar"
}
will the expression
output:
to: '{a: 1}'
result in
{
"foo": "bar",
"a": 1
}
or
{
"a": 1
}
Personally always extending makes sense to me from a usability perspective but it seems to me that context could really explode in size this way. Especially because jq has built in methods for extending objects, such as
output:
to: '.a = 1'
or
output:
to: '$context + { a: 1 }'
which both are more explicit about extending
Why is this needed:
This is relevant for making sure data flow is implemented correctly and context does not explode in size.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done