Can I reference input variables directly in the Code module without mapping them one by one?

Hi! I'm using the Code (JavaScript) module in a workflow and I currently map input variables one by one like this:

const sub0_media_source = " ";
const sub0_media_image = " ";
const sub0_type = " ";
const sub1_media_source = " ";
const sub1_media_image = " ";
const sub1_type = " ";
// and so on...


Is there a way to access these variables directly from the input data as an object or JSON, without mapping each one manually in the input fields? For example, something like input["sub0_media_source"] inside the code?


It would save a lot of time when dealing with 10+ values. Thanks in advance!

1753627534093.png
 

ArshilAhmad

Well-known member
Staff member
Please disable 'Simple Response', then click on the 'Save & Send Test Request' button to see if that gives you the desired result.
1753659330373.png
 
Top