How to add a float to an array under a boolean condition?

This is probably one of the simplest concepts to answer but from what I searched in blueprints there is no “Add to array if this satisfies this condition” node. Trying to add a distance float into an array of floats that hold the greater distances between player, AI, and targetpoints. Thanks.

Because there no need for something like that, with this logic all nodes would have 2 versions of it self with bool condition. Simply use “Branch” before "Add to Array, you can make macro if you want to simplify it