Consider following flow:
Inject node sets
payload.category to "Business" (this part will to become dynamic).
Retrieve text file,
payload.category is dropped.
In the change node I want to use jsonata:
I could use "topic" instead in the inject node, but the change node cannot access msg.topic, only payload (in jsonata).
So next step would be to add another change node, faced following block:
- If payload contains an array, one cannot set another property in payload. ie. move
msg.payload.category- this seems to be ignored due to the existing array, is this correct ?
- I have moved both the array to
msg.payload.channelsand topic to
msg.payload.category- this works.
- Can one use a "dynamic" value in jsonata ?
payload.channels.$[$contains(tv_categories, payload.category)] does not want to work