Skip to content

Intrinsic function: States.ArrayLength #478

@meenahoda

Description

@meenahoda

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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions