To pass more than one variable to the CJS module, you will need to use VALID JSON.
e.g.:
{
"variable1": {{2.variable1}},
"variable2": {{2.variable2}}
}
How to use the Custom JS module?
-
Map a variable (or a JSON object) into the “Input” field.
-
Write a function to do something with the
input
variable. If the input is a JSON, you can reference object properties using dot notation. -
Write a final statement to return the call of the function you wrote.
Further Information
If you need help with using Custom JS modules, please create a new thread. This helps keep the forum organized and helps me get to your question faster.
You can also take a look at the official documentation here for more advanced usage:
- Custom JS Documentation
- Available NPM modules (plugins for use in your JavaScript)
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.