Mapping set of multiple variables from different data root payload
What is the problem & what have you tried?
I want to map the exact same set of variables coming from the exact same bundle, with the unique difference that the mapping root is not the same (look at the attached screenshots) :
{{1.workflow.children.children}}
{{1.payload.workflow.children.children}}
{{1.payload.job.workflow.children.children}}
I tried to create a variable of those variable roots but it didnât work. In other words, I tried to get âpayload.job.workflowâ or âpayload.workflowâ or âworkflowâ depending on my input flow.
Make doesnât allow truly dynamic mapping paths (you canât build {{payload.job.workflow}} on the fly). Best fix is to standardize the JSON first (Parse JSON / Set variable) so you always map from one stable path like workflow.children.children.
whatâs the problem exactly? The data is supposed to come as one of the three variables, but you donât know which one it is?
If that is the case, you can have a nested ifempty() function that checks one, if its empty, checks the second and keeps going until one variable returns an output.
Also your map() function in the attached PDF is wrong. The first argument should be an array.