Workflow : array to json

Hello everyone,

I was trying to convert an array to json via JSON.stringify but for some reason it throws an error " Failed to decode Array to non-slice".
Is there any restrictions on scope argument in jsenv function in workflows ?

The error was :
Array Error

I ended up by constructing the json string manually but is there a more elegant way to do it ?

Thank you in advance for your help,

Cheers

This works for me:

  • create an array in expression
  • use toJSON in another expression

arr_1
arr_2

2 Likes

Thank you very much, it works !

1 Like