Iterative JSON construction help needed

Hi,

I need to create a JSON for each row of my table to pass to an API.

The problem I have is that the server database doesn’t accept null values for specified fields.

So I think I need to pass each row individually to a module, use the ‘Remove empty columns’ action, and then generate the JSON and pass it back.

However I don’t know how to pass the entire row to the module, if indeed that’s what I need to do, I’m open to other ideas too. I’ve tried iterate table too but had no luck. Any help is much appreciated.

I’ve attached the example data and workflow.

Thanks,

Alistair

Iterating JSON generation - for EM support 03-11-2025.xlsx (7.0 KB)

Iterating JSON generation - EM support 03-11-2025.morph (5.3 KB)

Using “Iterate table” is the correct approach. Just enumerate rows before iteration and add a parameter to filter rows by number, to keep only 1 row in each iteration.

See the attached example. I’ve also added one more option to create JSON manually.

Iterating JSON generation - EM support 03-11-2025.morph (10.3 KB)

ah I was so close to this yesterday, thanks Dmitry! Is there an advantage to Enumerating rows (and then using that as the row parameter) if the CaseId is distinct already?

No advantage. Any distinct column would work.

1 Like