Widgets/Transformer

Get Property Widget

Get Property Widget

A "Transformer" type widget. Get Property Widget allows you to extract specific properties from JSON objects. It's particularly useful when working with complex data structures and you need to access specific values.

 

Inputs

  • in (DataType: JsonObj) The input object to extract properties from. This can be a JSON object.

Outputs

The Get Property Widget creates dynamic output ports based on the properties you configure. Each output port's type is automatically detected based on the input data:

  • For JSON objects: The type matches the property's value type
  • For arrays: Includes a "length" property of type Number
  • For nested properties: The type is determined from the nested value

Custom Settings

Property Configuration

You can configure multiple properties to extract from the input object:

  • Name — The name of the output port
  • Label — The property path to extract. Top-level names appear as suggestions after you run the recipe; nested paths must be typed using dot notation.

Property Detection

The Get Property Widget automatically detects top-level properties from the input object and their types after you run the recipe once. These detected names appear as suggestions to speed up configuration.

This helps you:

  • Identify which properties exist at the first level
  • Confirm the data type of each property
  • Notice when an object contains nested structures that must be specified manually

Property Settings

 

Examples

Basic Property Extraction

This example shows how to extract simple properties from a person object:


Drag the example onto the workspace to explore and experiment!



In this example

  1. The Text to Object widget receives a JSON object with person data
  2. The Get Property widget extracts the "name" and "age" properties
  3. The Get Property widget transmits each property through its respective output port
  4. The Text widget displays the name value
  5. The Display widget shows the age value

 

Nested Property Access

This example demonstrates accessing nested properties using dot notation:


Drag the example onto the workspace to explore and experiment!



In this example

  1. The Text to Object widget receives a JSON object with nested address information
  2. The Get Property widget extracts the "address.city" and "address.street" values using dot notation paths
  3. The Get Property widget transmits each nested value through its corresponding output port
  4. The Text widgets display the extracted city and street values

 

📌 Additional Notes

  • Properties that don't exist in the input object are ignored
  • Array inputs automatically expose a "length" property
  • The Get Property Widget supports deep property access using dot notation (e.g., "user.address.city")
  • Property types are automatically detected and updated if they change
  • The Get Property Widget preserves the original data type of each extracted property

 

Glossary

  • Dot Notation

    A programming syntax that uses dots (.) to access nested properties in objects. For example, "user.address.city" accesses the city property within the address property of a user object.

  • First-level Properties

    Properties that exist directly on the root object (no dots in the name). For example, "name" and "age" in { "name": "John", "age": 34 }.

  • JsonObj

    A data type representing a JSON object structure that can contain properties and nested data.

  • Nested Properties

    Properties located inside inner objects, referenced using dot notation. For example, "address.city" and "address.street" in { "address": { "city": "New York", "street": "5th Avenue" } }.