How to Add Parameters Dynamically from result of Another Call

I have two collections OData (v2) Collections (connected via BTP Destinations). I need to merge them into a single variable.

To give a simple example let’s assume we have the following fields:

AccountTeam: EmployeeID, Role
EmployeeBasicData: EmployeeID, EmployeeName

First I need to make a request like:
GET AccountTeam?$filter=AccountID eq ‘1234’
Which results in the following list of objects:

{"EmployeeID": "9999","Role": "Sales"},
{"EmployeeID": "8888","Role": "Marketing"}

Then I’d like to make the following request based on the result of the previous call:
GET EmployeeBasicData?$filter=EmployeeID eq ‘9999’ or EmployeeID eq ‘8888’

Based on these two result, using employeeID as key, I’d like to have the following result as a variable:

{"EmployeeName":"Atakan", "EmployeeID": "9999","Role": "Sales"},
{"EmployeeName":"John", "EmployeeID": "8888","Role": "Marketing"},

Since the number of employees in a team could vary I need to filter dynamically however I couldn’t write a suitable formula that could suit my needs.

Any ideas how can I achieve this?

Of course normally this is easy with the $expand option however BTP Destinations do not support expand function…