Skip to main content

Get Keys

Retrieves all property keys from an object as an array.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.

Inputs

  • Object - The object from which to extract property keys.

Options

This node does not have any options.

Outputs

  • Keys - Array of strings containing all property keys from the object.

How It Works

The Get Keys node extracts all property key names from an object. When executed, the node:

  1. Receives an object through the Object input
  2. Validates that the input is a valid object and not null
  3. Iterates through all properties in the object
  4. Collects all property key names into an array
  5. Outputs the array of keys through the Keys output

Requirements

  • Valid object as input (cannot be null)

Error Handling

The node will return specific errors in the following cases:

  • ErrInvalidArg - Object is null or undefined
  • ErrInvalidArg - Input is not a valid object

Usage Notes

  • Returns only the top-level property keys, not nested keys
  • The order of keys in the output array may vary as object properties are unordered in most implementations
  • If the input object is empty, returns an empty array
  • Works with any valid object structure
  • Useful for object inspection and dynamic processing workflows
  • The output array can be used with array processing nodes for iteration
  • Can be combined with Get Values node to process key-value pairs
  • Helpful for validating object structure before processing
  • Useful for debugging and logging object contents

Example Use Cases

Validate Object Structure

Check if required keys exist in an object:

Get Object →
Get Keys →
Check if "name" exists in array →
Proceed or Handle Error

Dynamic Object Processing

Iterate over all properties in an object:

Get Object →
Get Keys →
For Each Key →
Get Property Value →
Process Value

Object Comparison

Compare two objects by their keys:

Get Object 1 → Get Keys → Keys1
Get Object 2 → Get Keys → Keys2
Compare Arrays → Find Differences

Generate Report

List all available fields in a data object:

Get Data Object →
Get Keys →
Format as Report →
Display Available Fields

Filter Object Properties

Select specific properties from an object:

Get Object →
Get Keys →
Filter Keys (keep only needed ones) →
For Each Key →
Build New Object with Selected Properties

Tips for Effective Use

  • Use this node to understand object structure before processing
  • Combine with array filtering to select specific keys of interest
  • Use with loops to process all properties dynamically
  • Helpful for creating dynamic forms or UI based on object structure
  • Store the keys array in a variable for reuse in multiple places
  • Use for validation by checking if expected keys are present
  • Combine with Get Length to quickly count object properties
  • Useful for creating object documentation or schemas