Create array without writing functions

I know how to create an array with a function, but how can I inject directly an array?

Can I create an array with number injection and another predefined node without writing a function?

Thanks

Hi welcome to node-red

You can use an inject node to make an array or a change node (set for json or Jsonata)

You can also use a template node.

Give it a try.

thanks a lot.
If I have 3 responses of 3 nodes. Can I convert in an array of 3 positions without write my own function?

Join node can take 3 messages and generate an object then you could use change node and JSONata

Question. Why the aversion to function nodes?

Sometimes, a function node is the right thing to do (can be the difference between a single node Vs sprawling spaghetti hell / incomprehensible JSONata)

Its not difficult to work with arrays in a function node and there are many who can help when you need it.

Edit..., the join node might even be able to make an array from your messages (I can't remember it's capabilities of the top of my head)

Thanks. You are right with the funcions. But first I would know how to do things without them.

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