merge by field
This block is part of the array group and was last modified in core v14.0.3.
merge by field v14.0.3 will return the base array with the matches merged in, pairing base_array_key against merge_array_key. The base array items are modified in place.
- base required
array - merge from required
array - base array field required
valuethe field in the base array to match on
- merge array field required
valuethe field in the merge array to match on
- merge match field required
valuethe field to merge the matches in
- merge as array
conditionshould we merge the matches as array into the merge field
- remove _meta from merged
conditionshould we remove the
_metafrom each matching merge item
- array
arrayresult is the base array with the matches from the merge array
For each base_array item, collects the merge_from items whose merge_array_key value equals its base_array_key value (compared as strings) and writes them into the field named by merge_matches_key, MUTATING base items in place. With merge_all_matches true (default) that field is always an array, [] when none match; when false it holds only the FIRST match, null when none. Base items without the base key are left untouched; if any key pin is empty NO output is emitted.
A typical wiring for merge by field: value feeds the base_array_key pin; search feeds the base_array pin; true feeds the merge_all_matches pin; with values feeds the merge_from pin; value feeds the merge_array_key pin; value feeds the merge_matches_key pin; the array out pin feeds reverse.
Commonly used with
In production blueprints, this block is most often wired together with:
- value: feeds into this block. Simply returns the provided value.
- search: feeds into this block. searches in the given storage based on a query.
- reverse: this block feeds into it. Reverses the order of elements in the given array.
- true: feeds into this block. Gives the condition true hard-coded.
Version history
Introduced in v14.0.3.
Back to
array Return to the main group to view all sub-groups Back to array Return to the group to view all blocks within this group 