How to exchange all data in a structure / array

I have a structure variable that stores the values of enemies in my game such as their health, name , etc. i want a way to be able to switch them efficiently because the method I am doing right now is very hard coded and it’s very difficult to add smth new


I essentially wanna swap all the elements of the structure Data.slot1 to Data.slot2 , the same way It is done in my events separately. Pls help

You can use the Json format. Here are 2 examples. A copy and a swap. The swap requires a text variable to store the Json.