-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
States.ArrayGetItem
Description from https://states-language.net/#appendix-b
This intrinsic function returns a specified index's value. This function takes two arguments. The first argument is an array of values and the second argument is the array index of the value to return.
For example, use the following inputArray and index values:
json { "inputArray": [1,2,3,4,5,6,7,8,9], "index": 5 }
From these values, you can use the States.ArrayGetItem function to return the value in the index position 5 within the array:
json "item.$": "States.ArrayGetItem($.inputArray, $.index)"
In this example, States.ArrayGetItem would return the following result:
json { "item": 6 }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels