Unexpected behavior when copying a structure variable

If myArray is an array of structures, what is the difference between the following two actions that makes ony the second one work?

In the first case I get 0 as a result, while in the second case it correctly copies the first element of myArray into elem. I would expect the first method to behave the same way.
Is serializeing and parsing a variable the most efficient way to copy it?

Expressions values can only be a number or a text. It can’t be a structure.
ToJSON() takes a variable and returns a text. That why it works.

1 Like