combine_lists
Combines multiple lists into a single flat list. Takes a list of lists as input and returns a single list with all elements merged in order.
Syntax
combine_lists(list_of_lists)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| list_of_lists | list | Yes | A list containing the individual lists to combine. |
Returns
Type: list
A single list containing all elements from the input lists, in order.
Examples
Merge two record lists:
combine_lists([[1, 2, 3], [4, 5, 6]])
Result: [1, 2, 3, 4, 5, 6].
Combine fields that each contain a list of values:
combine_lists([[group_members], [additional_members]])
If group_members is ["alice", "bob"] and additional_members is ["charlie"], the result is ["alice", "bob", "charlie"].
Notes
- Non-iterable elements within the outer list are silently skipped.
- The function does not deduplicate values. If the same element appears in multiple input lists, it will appear multiple times in the result.
- The order of elements is preserved: all elements from the first list appear before elements from the second list, and so on.
Comments
0 comments
Please sign in to leave a comment.