Hello I am running into issues attempting to extract my Context Array using the Function Node.
Here is my Flow Context:
And here is the function node code I am attempting to use to obtain the array value:
let values = flow.get("values.content");
However when I place a debug node to see what is delivered back, I only receive the first value of the array. Is there any documentation describing how to get arrays within Context?
You are returning values, an array, so node-red is sending first array value to output one of the function node. All other values are going to output 2, 3, 4, etc . As there are no other outputs you dont see them.
msg.values = flow.get("values").content;
Your array would then be in msg.values.
If you are sending a message to one output, you must return an object.
If you return an array of objects then the objects will be sent to different outputs, whether they exist or not.
Appreciate the help @E1cid! That was the solution.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.