Return Multiple Match from 2 Json

Hey team, Having a very interesting time with the new Function Node

Trying to get a multiple match for the 2 json from gsheet

End up found one match and bunch of null, and having a tough time remove NULL…

Please advice

Hi @Victor_Tong, I am not sure what output exactly you are trying to get on your final Return Multiple Match on Star Time Mock node, but I think the problem could be the $("Star Time Mock").item part. As per the overview in our documentation the linked item functionality is not available in the Code node.

So if you are trying to find matching items from your Start Time Mock node for each of the items you are getting from your Vdate Mock node and also keep the existing item (instead of returning null), perhaps you might want to use something like below?

This approach would keep all incoming data (and thus avoid empty items). In case any matches are found it would return them in a new matching_items field:

I am using the $('Star Time Mock').all() method to read all items from the Star Time Mock node, the .filter() method to only keep the matching items, and lastly .map() to only keep the data under the json key.

Is this what you had in mind?

Thanks mate, well explained

I think so, is there way to actually just return ONLY
the Row of the Matched Record?

Yes, simply remove the ...$json part from the return statement. This would mean only the matching_items field is returned, without the input data.

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