Object

Introduction

The Object library in Autom Mate provides actions designed to work with data and functions encapsulated within objects. An object, in the context of this library, contains both data and its associated functionality.

The purpose of the Object library is to offer operations that manipulate and interact with objects, allowing users to manage data structures effectively.

What is Object?

The Object component consists of actions tailored for handling operations related to objects. It includes actions such as appending new data to objects, creating new objects, converting XML data to objects, and searching for specific data within objects.

Key Features

  • Append:

    • Add new data or properties to an object.

  • Assign:

    • Create a new object with specified data and properties.

  • Convert "XML" to Object:

    • Transform XML-formatted data into an object for easy accessibility.

  • Search:

    • Locate specific data within an object using various search criteria.

How To Use Action

Append

Description: The Append action adds new data or properties to an object, extending its functionality.

Usage:

  1. Object Variable:

    • Select the object variable to which new data will be appended.

  2. Data to Append:

    • Add new data to the object.

    • Usage patterns are provided as examples.

    • Data is filled into the object using quotation marks between the [ ] brackets.

Assign

Description: The Assign action is used to create a new object with specified data and properties.

Usage:

  1. Object Variable:

    • Provide a name for the new object variable.

    • Select an existing object type variable or create a new one.

  2. Variable:

    • Fill the object variable with data.

    • Use quotation marks for string data.

    • Numeric data can be added without quotation marks.

Convert "XML" To Object

Description: The Convert "XML" to Object action transforms XML data into an object or data structure for easier integration and manipulation.

Usage:

  1. Input XML:

    • Define your XML data either as a file path or manually.

    • Select 'manual input' to write XML data directly.

Description: The Search action allows users to search for specific data within an object using various filters.

Usage:

  1. Object Array:

    • Provide the object or array to search within.

  2. Add Filter:

    • Specify the key, operator, and value for the search.

    • Available operators include "is equal to," "is not equal to," "is empty," "is not empty," "has property," and "contains."

  3. Case Sensitive:

    • Enable to perform a case-sensitive search, considering exact case matches.

Remove Keys

Description and Purpose

The Remove Keys action enables Autom Mate users to remove one or more specified keys from an existing JSON object variable within their workflows. This action is useful for filtering out unnecessary or sensitive data fields before further processing or storage.

By providing the source object and the keys to remove, users can efficiently clean or customize their data structures dynamically.


Usage Instructions

1

Provide Source Object

Source Object: Select or provide the JSON object variable from which keys should be removed. Example: ##obj## or ##xObjectVariable[user]##

2

Specify Keys to Remove

Keys: Enter the keys you want to remove from the source object. Enter each key individually and press Enter after each one.

Example:

  • key1

  • password

  • metadata

3

Assign Resulting Object Variable

Assign the removed keys to variable: Choose an object-type variable (e.g., resp) to store the resulting object after keys have been removed.

4

Execute and Review

Run the flow. After execution, the output variable will contain the source object minus the specified keys.


Inputs

Field
Description

Source Object

The JSON object variable to modify (required). Example: ##obj##.

Keys

The list of keys to delete from the source object (required). Enter one key per line.

Output Variable

An object-type variable to store the resulting filtered object (required).


Outputs

Field
Description

Output Variable

The filtered JSON object with the specified keys removed.


Example Response

{
  "key2": [],
  "key3": {}
}

If key1 was removed from the original object:

{
  "key1": "test",
  "key2": [],
  "key3": {}
}

Additional Tips

Last updated

Was this helpful?