Trouble with removing index from array that is nested in a struct and nested in a map

hello, I am having issues understanding why the remove index node is not removing the values from the array. The array is currently inside a struct and the struct is held in a map. I think it might have to do with not having access to the ref and just a copy of the array which is why its not getting removed but I cant figure out how to gain access to the ref to edit it directly. Any ideas would be extremely helpful :).

Hey! Welcome back :slight_smile:

Since you are using pure date most of the getters are probably returning copies. I think your suspicion is right and you are modifying a copy of the array.

You probably wont be able to get a reference out of it with blueprints.

My suggestion is to modify the array (remove element) and then write/set it back in the struct, which you set back in the map. Move all that in a library function and later, when you feel the need, just replace the library with a c++ library. Pure data management at scale is better handled in c++ anyway but I doubt you’ll reach a scale when that would be necessary.


Yea that was it thank you so much you were a big help :grin:.

I ended up making a copy of the array and map as local variables, then saving how many items were removed from the array and removing it after in a separate for loop. When the for loop finished I set the local array into the local map and overwrote(Set) the original map info with the local map and it worked perfectly.