Array expression to be filtered.
Must be an expression that evaluates to an array containing business entities or data that requires filtering based on specific criteria. Can reference variables from previous API calls, array literals, or other expressions that produce arrays.
The array elements will be individually evaluated by the filter function to determine inclusion in the filtered result. Each element should be compatible with the filtering logic defined in the function parameter.
Examples:
Business context: Typically represents collections of entities that need subset selection based on business rules, such as active users, available products, or eligible transactions.
Arrow function defining the filter criteria.
Called for each array element to determine if it should be included in the filtered result. Should return a boolean expression that evaluates business conditions relevant to the filtering purpose.
The function parameter represents the current array element being evaluated and can be used to access properties for business logic conditions.
Type discriminator.
Array filter expression for selecting elements that meet criteria.
Filters array elements based on a predicate function, keeping only elements that satisfy the specified condition. Essential for extracting subsets of business data from captured API responses or test collections based on business rules and conditions.
E2E testing scenarios:
Primary usage: Processing captured data from API operations to create focused datasets for subsequent operations or validations.
AI function calling strategy: Use when business logic requires working with specific subsets of data captured from API responses, especially for conditional operations or validation scenarios.