Searching an Array

So i have an array of a custom struct, the struct contains a string and a float.

I wish to search through my array for every string that is the same ( equals each other) then take the float values and add them.

How would i create a system like this?

You can use the ForEachLoop-Node for this. There you can execute what ever you want for each element. There you could check the string and (with a branch) if it is true, you can add the float value to a variable you declared before.

That part I understand but it creates me a new issue.
In my string lets say i have this

String = A
Float = 4.2

String = B
Float = 2.5

Okay so if i have two off each of these it will just add all the floats together into 1 total sum.

I need away of separating them and adding them to individual float variables so i tried using an array but i dont know how to filter that array to say find String A then add that total too .

In the foreachloop, take your string (with break struct or something like that, i don’t know how structs in bp work exactly), and use an equal(string) node. The first input is the string of the struct, and the second input the string you want to filter. Put the output of the equal node into a branch node and use the True-output of it to sum up the float.

Sorry, I currently cant show you a sample blueprint, maybe later.

Thats what i would do but i need this to be dynamic, so it does this: process for any information i throw into it for example say my string goes from A to Z and i need to store and total up all the floats if they have more than one of the same type in my array

Oh you want to group by string.
Then I would advise to use a map for this (you can change a variable type to map with the icon next to the type). For every string you encounter you get the current value saved in the map for this string and add to it the float, or if one doesn’t exist yet you just add this string to the map with the float.