I searched but found no answer.
My problem is that I want to add a structure to a child of a structure.
Using ‘add variable to array’ changes the child to an array.
Can you provide a little more context? It would probably be easier to just add the children to the main structure. Maybe dynamically.
IDK if there’s an easier way or an extension. My only idea is to convert the structure to JSON and then add the JSON as the new child.
This adds the structure “Apple” to a structure named “Fruits” using the name in the variable FruitName which is Apple.
There might be an easier way but it would require more information.
I believe it’s the simplest way. You cannot set the child’s value - the expected types are text, number or boolean. It’s a bit annoying how there are actions to add variables to arrays, but not to add variables to structures.
Works perfectly.
I’m still disappointed that no event exists for directly adding it instead of doing the JSON conversion, which could confuse beginners.