Get struct item from array by string

Hi,

i have a costum struct like this:

vector : worldLocation

string : name

and i have an array with these structure and a second array with the names that i need to find from the struct array.

How can i get all items from the array only by the “string name”?
For example the name array is : house1, house2, road2. How to find all items from the struct array with these names?

What you looking for is probably maps, they are key/value array and they are optimized on C++ level in any array management based on any type of key like String. They recently (well few version back so not that recent anymore) got blueprint support. It always better then doing setup on your own

Also, DataTable - a glorified struct editor - can fetch structs (or other struct arrays) by name.