keys
  • 23 May 2023
  • Dark
    Light
  • PDF

keys

  • Dark
    Light
  • PDF

Article summary

keys (object) Task Purpose

The keys (object) task accepts an object that contains key/value pairs and will return an array that contains the 'key' field information (only) in the same order as it was presented by the original object. JSON formatted content is an object, and therefore a highly suited use case.

Potential Use Case

Use this task if you need to build a form that displays 'key' names of an object as labels on the form.

Properties

Incoming Type Description
obj Object Required. The object from which the key names should be converted to an array.


Outgoing Type Description
keys Array The key names found within the obj variable.

Example

In this example, the obj value is statically set to:

{
  "success": true,
  "deck_id": "bybjeupe9ymb",
  "remaining": 52,
  "shuffled": true
}

keys-01

Note:

This sample content was obtained via the GET/restCall task applied to the Deck of Cards API.

The outgoing keys value will be an array with the following contents:

[
  "success",
  "deck_id",
  "remaining",
  "shuffled"
]

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.