Connectors / Helper / Object Helper

Helpers for interacting with data objects (updated: 1614613466973)

Object Helper

Interact with your workflow objects more fluidly, professionally and easily.

Overview

The Object Helper connector allows you to interact with objects more easily and efficiently, depending on your workflow needs.

Think of the Object Helper connector as a 'tidier' way of dealing with data, from multiple steps, sources and / or databases.

It primarily helps users alter their data into a format which subsequent steps can then work with more proficiently.

See our operation summaries below for more ideas and information on your potential data manipulation options.

USER TIP: A user can also use the Object Helper to create an object from the data gathered throughout the workflow steps, and then send said object to another workflow using the Callable Trigger. See our documentation for more details.

TRAY ACADEMY: Interested in getting to grips with even more features? Why not check out our academy video: Object Helpers. It covers basic concepts, potential use cases, and some of the best ways to utilise specific operations.

Object Helper Templates

Below are some relevant templates you may wish to use or learn from. The full range can be found in our Templates Library.

Templates demonstrate pre-configured best practices / common use cases as well as examples of how to use this connector and how best to integrate it with others.

IMPORTANT! Please make sure you read the notes and instructional sections on this page before using any of these templates. A basic understanding of this connector's capabilities will help avoid potential pitfalls during your own build process.

Operations

Add Key / Value pairs

Adds fields to a pre-existing object

Or creates a new object from scratch

Then returns everything in the form of a 'new' single object

USER TIP: If you need to update/ create a new Value based off a pre-existing Key, use the Add Value by Key operation instead.

Add Value by Key

Updates the value of a particular field

USER TIP: If you need to return a singular object (i.e. create both the Value and the Key in question), use the Add Key/ Value pairs operation instead.

Contains

Checks if an object contains a particular field.

Returns:

  • True if an object contains your specified field

  • False if otherwise

USER TIP: If you need to return the Value of the data itself, use the Get Value by Key operation instead.

Delete Key / Value pair

Allows you to delete a particular field from an object

Enforce Object Structure

Defines a structure that the object MUST adhere to

Once confirmed any additional fields from the input are also included

USER TIP: You may find that our Fallback values feature a more effective and simpler way to deal with inconsistent data - especially when Service APIs do not return anything at all for fields with missing values and can cause errors in subsequent steps trying to pull those fields.

Equals

Allows you to check if two objects are the same.

Returns:

  • True if the object has exactly the same fields and values as the comparative

  • False if otherwise

USER TIP: If you need to find the difference between two objects, use the Find Difference operation instead.

Find Difference

Compares two fields or objects.

Returns:

  • The differences if there are any

  • Empty if none found

USER TIP: If you need to return a boolean indicator based off the difference between two objects use the Equals operation instead.

Get Value by Key

Allows you to retrieve the value of a particular field

USER TIP: If you need to return a boolean result use the Contain operation instead.

Iterative transform

Goes through the fields available and alters them as requested (capitalize, camelCase etc.)

JSON Parse

Takes JSON code and returns it as an object

USER TIP: If you need to turn an object into a sting use the JSON Stringify operation instead.

JSON Stringify

Takes an object and transforms it into a JSON string

USER TIP: If you need to turn an string into an object use the JSON Parse operation instead.

Map Keys

Allows you to change the field name referenced and replace it with your preferred name

USER TIP: Check out our documentation on the Data Mapper core connector for more potential mapping use cases and operations.

Merge two objects

Allows you to merge two objects into one

The primary object is the main point of reference

Pick Values by Keys

Allows you to return a Value by its reference field

Properties Exist

This operation checks if the fields mentioned exist and returns:

A list of found items

A list of not found items

As well as a True/ False value for the original query

Remove Null Values

Allows you to Delete any fields with null or empty values

All Operations

Latest version:

4.1

Find difference

Finds the difference between two objects and returns it.

Get value by key

Get a value from an object by its key.

Add key/value pairs

Adds key/value pairs from a list array to a source object as properties and returns a singular object. The source object can either be empty or populated with properties. The list array contains objects and each object will have the fields key and value.

Add value by key

Add a value to an object by its key.

Contains

Returns true if an object contains an assigned value, false otherwise.

Delete key value pair

Delete a key value pair with a given key.

Enforce object structure

Define a JSON structure which the output object must adhere to. The output object will contain at least the defined structure along with any additional fields from the input.

Equals

Returns true if an object is exactly the same as another object, false otherwise.

Iterative transform

Given an object, iterate through its properties, and transform the associated keys and values accordingly.

JSON parse

Take a JSON string/text and parse it into an object.

JSON stringify

Take an object and transform it into a JSON string.

Map keys

Given an object, transform the given property key names.

Merge two objects

Merge two objects. If there is any property specified in both objects, the one specified in the first (source object) will be used.

Pick values by keys

Pick values from an object by its keys.

Properties exist

Check if a list of properties are found in an object. If any are not found, a list of the properties not found is returned.

Remove null values

Remove Null and/or empty String values from an object.