Widgets/Transformer

Combine Object Widget

Combine Object Widget

A "Transformer" type widget. Combine Object Widget merges multiple objects into a single one. It is used to collect objects from its dynamic input ports and combine their properties. When a signal is received on the "read" port, the resulting merged object is transmitted to the "output" port. This widget is useful for aggregating data from different sources, merging configurations, or creating composite objects in your Workflow.

 

Inputs

  • input1...n (DataType: Anything) Receives an object to be merged. The properties of this object will be added to the internal combined object. If a property with the same name already exists in the combined object, it will be overwritten by the new value from the most recently received object. Non-object inputs (strings, numbers, arrays) are ignored.

  • read (DataType: Anything) Triggers the widget to transmit the current combined object through the output port. After transmitting, the internal combined object is cleared and reset to an empty object.

  • clear (DataType: Anything) Resets the internally stored combined object to an empty object without emitting any output.


Outputs

  • output (DataType: JsonObj) Transmits the combined object containing all merged properties from the input objects.

Custom Settings

  • Total Inputs — This setting allows you to define the number of input ports the widget will have. You can configure from 1 to 20 input ports depending on how many objects you need to combine.

Combine Object Settings

 

Example

Combine User Profile Data

This example demonstrates how to combine two separate user profile objects into one complete user profile and display the result:


Drag the example onto the workspace to explore and experiment!



In this example:

  1. Two Object widgets provide separate user profile data:
    • The first object contains {id: 10, name: "John", score: 78}
    • The second object contains {age: 34, lastname: "Doe", score: 90}
  2. The Sequence widget triggers the objects to be sent to the Combine Object widget, then triggers the read operation
  3. The Combine Object widget gathers objects from its dynamic input ports and merges their properties
    • Since the score property exists in both objects, its value will be overwritten by the one from the most recently received object (90)
  4. When a signal is received at the "read" port, the combined object {id: 10, name: "John", score: 90, age: 34, lastname: "Doe"} is transmitted through the "output" port
  5. The Object to Text widget converts the merged object to JSON format for display

 

📌 Additional Notes

  • Only object-type inputs are processed. Non-object inputs (strings, numbers, arrays) are ignored.
  • When duplicate property names exist, the value from the most recently received object takes precedence.
  • The internal combined object is automatically cleared after each read operation.
  • The widget supports dynamic input ports.

 

Glossary

  • Composite Objects

    A combined object composed of merged properties from multiple source objects within a workflow.