How to merge request and response data

Hi, I do call an external rest api receiving an array of objects as response. With a function node I loop over that response filtering out some data (request parameter) I need to use to call an other rest api. The response from the second call is again being processed to check wether or not it matches a specific criterium. If so, I want to merge the result from the second response with the request parameter from the first call. Unfortunately, the http request node does not provide input data as part of the output data. So, how do I manage to merge these two into one final data object?

I think that if you copy the data you want into an extra msg property, msg.myData for example, then that should be preserved by the http node so you can pick it up again later.

1 Like

Japp, that did the trick. Thank you :slight_smile:

Could you mark my post as the solution please, so others will know it is solved. Click on the three dots below the post. Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.