How to perform this flow?

How It Works:

If There is only Input A and Input B node is not executed. I want All Records From Input A.
When Input B has matching records by id, it enriches Input A with updated fields from Input B.

Potential Issues:
Ensure Input B inputs have an id field

Hello, maybe this is what you are looking for ?

Explanations :
Input A & Input B:

  • Input A has a list of records with IDs and values.
  • Input B contains updated records (but not necessarily for all IDs).
    Split nodes: Since the inputs are arrays, the workflow splits them into individual records so they can be processed properly.
    Filter node on Input B: We only keep records from Input B that actually have an ID (to prevent errors).

Merging Data:

  • Every record from Input A is kept.
  • If there’s a matching record in Input B, it updates the value.
  • If no match is found, the record stays as it is.

Example:

Before merging:

Input A: [{id: 1, value: "Juan"}, {id: 2, value: "John"}, {id: 3, value: "Hugo"}]
Input B: [{id: 1, value: "Alice"}, {id: 2, value: "Alice"}]

After merging:

Final Output: [{id: 1, value: "Alice"}, {id: 2, value: "Alice"}, {id: 3, value: "Hugo"}]

So basically, Input B updates Input A where possible, but doesn’t remove anything. Let me know if it’s what you were looking for ! :slight_smile:

wow @lugnicca This is great. Will the below usecase work?

Case 1:

Before merging:

Input A: [{id: 1, value: "Juan"}, {id: 2, value: "John"}, {id: 3, value: "Hugo"}]
Input B: ``

After merging:

Final Output: [{id: 1, value: "Juan"}, {id: 2, value: "John"}, {id: 3, value: "Hugo"}]

Case 2:

Before merging:

Input A: [{id: 1, value: "Juan"}, {id: 2, value: "John"}, {id: 3, value: "Hugo"}]
Input B: [{id: 1, value: "Alice"}, {id: 2, value: "Alice"}]

After merging:

Final Output: [{id: 1, value: "Alice"}, {id: 2, value: "Alice"}]

This is what i am looking for.

In the merge node, select “Keep Matches” :