No doubt it can be done with a J: expression - a system so opaque it makes regular expressions seem transparent!
But can it be done with a single Set {} line?
What is the right low-code way to achieve this change?
Every time I see struggling with such data sources where output is just an array of numbers I just need to ask - can't it be improved.
Because of -
Can you trust the data to :
be always an array
always having same amount of elements
always having elements in same order
If you can, fine. If not - it is seriously source of (mostly hard to find and fix) failures.
Thanks for the J: solution Paul. I recognise J's utility but I can't warm to it...
hotNipi makes a good point that the incoming message shouldn't really be just a value or an array of values.
What I am actually trying to do is construct a mariadb prepared query. My selection criteria come from a dropdown which returns just the value - "January".
I could use a Change node to transform this to an object - {month: "January"} but ... [GOTO Line 1]
Edit - OK I can make the dropdown return a string {"month":"January"} and pass it through a Json parser node.