MergeBody
Merge data into the container’s body.
mergeBody(body)
Merge an object into the container’s body.
Arguments
Argument | Type | Description |
---|---|---|
body | object | Object to merge into the body container. |
Example
If the container’s body currently contains those data:
{
"username": "shudrum",
}
You can add values with the mergeBody
worker like that:
const workflow = [
mergeBody({ firstname: 'Julien' }),
];
The resulting container’s body will be:
{
"username": "shudrum",
"firstname": "Julien"
}
This worker can be useful on some cases, but generally speaking, you sould rethink twice before using it.