Object Types
> Represent structured data with named properties.
An object in Brickr is a collection of key-value pairs -- like a JSON object. Objects are used whenever you need to group related data together: a user record, a file reference, an API response.
Wire color: Indigo (#6366f1)
Generic objects
A plain object type can hold any key-value data. It has no predefined shape.
Use generic objects when:
- Working with dynamic data whose shape is not known in advance
- Passing raw JSON bodies from API requests
- Building objects on the fly with Make Object
Structures
A structure is a named object type with a defined set of properties. Structures enforce a specific shape, so you know exactly what fields an object contains.
The type format is object:StructureName. For example:
object:file-- A file reference with url, name, size, and typeobject:user-- A custom structure with your defined fields
System structures
Brickr includes built-in structures for common data shapes:
| Structure | Type | Fields | |-----------|------|--------| | File | object:file | url, name, size, type |
Custom structures
You can define your own structures to represent your data models. Custom structures appear in the Builder's type system and can be used as pin types.
Structures help the Builder show you exactly which properties are available. When you connect an object:file output to a Split Object node, it knows to offer url, name, size, and type as outputs.
Working with objects
Make Object
The Make Object node lets you construct an object from individual values.
- Add input pins for each property you want to set
- The output is a single object containing all the properties
Split Object
The Split Object node does the opposite -- it breaks an object into its individual properties.
- Connect an object input
- Each property becomes a separate output pin
- When the input has a known structure, the outputs are automatically configured
Get Property
The Get Property node extracts a single named property from an object.
- Input: An object and a property name (string)
- Output: The value of that property
Use Split Object when you need multiple properties at once. Use Get Property when you need just one.
Object type compatibility
| Output Type | Can connect to | |-------------|---------------| | object:file | object:file, object, any | | object | object, any | | object:CustomName | object:CustomName, object, any |
A specific structure can always connect to a generic object input, but not the other way around. A generic object cannot connect to a structured object:file input because the Builder cannot guarantee it has the required properties.
What's next?
| Topic | Description | |-------|-------------| | Arrays | Lists of objects and other types | | Primitives | String, number, boolean | | Enums | Named value sets |