Skip to content

CreateObject

CreateObject

Overview

The CreateObject Block constructs an object (dictionary) from the given key-value pairs. This is useful when you need to dynamically build an object with properties.

Description

Takes in inputs and creates an object containing the inputs

Metadata

  • Category: Misc

Configuration Options

No configuration options available.

Inputs

Name Data Type Description
**properties Any

Outputs

Name Data Type Description
object dict[str, Any]

State Variables

No state variables available.

Example(s)

Example 1: Create an object from properties

  • Create a CreateObject Block.
  • Provide inputs: {"name": "John", "age": 30}.
  • The Block will output: {"name": "John", "age": 30}.

Error Handling

  • The Block assumes that all provided inputs are valid key-value pairs.

FAQ

Can I create an object with nested properties?

Yes, you can include nested objects within the properties.