Script
The script processing component is used to process data. You can use a specified programming language to compile a script, process the data transferred to the script processing component, and generate new data for subsequent steps.
Configuration Parameters
Parameter |
Description |
---|---|
Script Language |
Programming language used for writing scripts. Currently, only JavaScript of the ES5 version is supported. |
Content |
Compile the script content. You can reference data from previous nodes. For details, see Referencing Variables. To parse content data in JSON format, use JSON.parse('${body}') to convert the content data into a JSON object and then parse the data. The script processing component can generate an output result and transfer it to subsequent nodes. You need to specify the name of the variable to be output at the end of the script. For example: function getUser(){ return {"id": ${property.id},"name":"${property.name}"}; } var user=getUser(); user;
NOTE:
If you need to write a function or logic code block, use braces ({}) to surround the code block. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot