Skip to content

Step Functions: support items.length > 0 in Conditions #77

@sam-goodwin

Description

@sam-goodwin

We can support a limited subset of list.length comparisons with the intrinsic IsPresent variables:

if (list.length > 0)
{
  "IsPresent: true,
  "Variable": "$.list[0]"
}
if (list.length  === 0)
{
  "IsPresent: false,
  "Variable": "$.list[0]"
}
if (list.length  === 1)
{
  "And": [
    {
      "IsPresent: true,
      "Variable": "$.list[0]"
    },
    {
      "IsPresent: false,
      "Variable": "$.list[1]"
    },
  ]

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions