Can I use the set variable block to define an array? What kind of syntax do I use?
Or do I need to set this up with a custom function?
Yeah… I know… the Set Variable is one of the newest blocks. MindStudio Architect v2 is not trained on that one yet. Otherwise he/she seems to have all the answers. I would not be making as much progress as I have without this ready help chat.
Hi @Townsend,
Thanks for the post!
You’re right, we’re in the process of updating the Architect, but there’s usually a bit of lag after new features ship.
You’re also correct that you can use the Set Variable block to store an array in a new variable. That said, for your use case, a Custom Function can be a more robust way to build a JSON array.
Here’s an example that does the opposite, it extracts the first object from an array and saves it to a new variable:
https://app.mindstudio.ai/agents/random-json-generator-270c50fb/remix