I can't find a way to put the "enrich
I can't find a way to put the "enriched" payload object into a different variable so that I can nest that into my POST data in the way that my API requires. Feature request, or anyone know a trick?
2 Replies
Can you expand on what you mean?
Re Combining Objects:
This seems like a good use case for the spread syntax. Ex:
Logs out: {"a": 1, "b": 2, "comment": "Extra data" }
Docs: https://developers.cloudflare.com/zaraz/advanced/context-enricher/
Cloudflare Docs
Context Enricher · Cloudflare Zaraz docs
The Zaraz Context Enricher is a tool to modify or enrich the context that is being used across Zaraz using a Cloudflare Worker. The Context Enricher …
Using POST, the payload object is enriched with all of the properties that show up. But I need to nest that object within another property so that the receiving end will read it.
{ "body": zaraz_payload }
Hoping to do this without a worker
If I could just assign a copy of the payload after it's been enriched to a new variable, then the problem would be solved