keys
- 23 May 2023
-
DarkLight
-
PDF
keys
- Updated on 23 May 2023
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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
}
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?