Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intrinsic function: States.ArrayLength #478

Open
meenahoda opened this issue Oct 17, 2023 · 0 comments
Open

Intrinsic function: States.ArrayLength #478

meenahoda opened this issue Oct 17, 2023 · 0 comments

Comments

@meenahoda
Copy link
Member

meenahoda commented Oct 17, 2023

States.ArrayLength

Description from https://states-language.net/#appendix-b

The States.ArrayLength intrinsic function returns the length of an array. It has one argument, the array to return the length of.

For example, given the following input array:

json{ "inputArray": [1,2,3,4,5,6,7,8,9] }
You can use States.ArrayLength to return the length of inputArray:

json"length.$": "States.ArrayLength($.inputArray)"
In this example, States.ArrayLength would return the following JSON object that represents the array length:

json{ "length": 9 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant