Hi Community,
We have built the following scenario:
When calling a webhook, then an (OneDrive-hosted) Excel file is read out, the rows are filtered through several query parameters (passed over from the webhook), then the resulting rows are being “aggregated to JSON” and returned as JSON in the webhook response.
This works quite well. (Constructive feedback regarding filters and error handling welcome though.)
I have the following issue with my scenario:
The resulting JSON which is passed over to the webhook (response) contains the mapped fields but not in the order which I have mapped in the “Aggregate to JSON” module and which I have defined in the chosen “Data Structure”. The JSON output always comes in another order of fields (also when calling the webhook via Postman).
See screenshots.
Already the input to the “Aggregate to JSON” module comes in the wrong order which is not transformed into the given order of the Data Structure:
Where is the mistake?
I have experimented already a lot with
- the modules “Array Aggregator”, “Create JSON”, “Transform JSON” and “Parse JSON” in between,
- the option “Preserve the order of object keys” in the Data Structure,
etc.
=> My goal is to keep it tool-based without custom code / scripts / individual structure definition (e.g. in the Transform JSON), so that I can easily add fields later on with the given means of the tools (Excel, Make module settings).
I hope you can help. Thanks in advance.
Mica