You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the States.ArrayContains intrinsic function to determine if a specific value is present in an array. For example, you can use this function to detect if there was an error in a Map state iteration.
This intrinsic function takes two arguments. The first argument is an array, while the second argument is the value to be searched for within the array.
Input validation
You must specify an array as the input value for function's first argument.
You must specify a valid JSON object as the second argument.
The input array can't exceed Step Functions' payload size limit of 256 KB.
For example, given the following input array:
json{ "inputArray": [1,2,3,4,5,6,7,8,9], "lookingFor": 5 }
You could use the States.ArrayContains function to find the lookingFor value within the inputArray:
json"contains.$": "States.ArrayContains($.inputArray, $.lookingFor)"
Because the value stored in lookingFor is included in the inputArray, States.ArrayContains returns the following result:
json{"contains": true }
The text was updated successfully, but these errors were encountered:
States.ArrayContains
Use the States.ArrayContains intrinsic function to determine if a specific value is present in an array. For example, you can use this function to detect if there was an error in a Map state iteration.
This intrinsic function takes two arguments. The first argument is an array, while the second argument is the value to be searched for within the array.
Input validation
You must specify an array as the input value for function's first argument.
You must specify a valid JSON object as the second argument.
The input array can't exceed Step Functions' payload size limit of 256 KB.
For example, given the following input array:
json{ "inputArray": [1,2,3,4,5,6,7,8,9], "lookingFor": 5 }
You could use the States.ArrayContains function to find the lookingFor value within the inputArray:
json"contains.$": "States.ArrayContains($.inputArray, $.lookingFor)"
Because the value stored in lookingFor is included in the inputArray, States.ArrayContains returns the following result:
json{"contains": true }
The text was updated successfully, but these errors were encountered: