How to set a bool with a variable name

Hello, I am wondering if it is possible to set a bool variable to true, but to not define which bool to set by direct reference. To explain better, I am working on a level unlocked system, and when a player completes “level 1” I want the “Level 2 Unlocked” bool to be set to true. I have setup a method for creating the string “Level 2 Unlocked” by getting the name of the current level, adding 1 to the suffix number, and then appending Unlocked to the end. I am wondering if there is any way to use this string to set the corresponding bool that it shares a name with, so I don’t have to use a ton of branches to define the unlock system. (included a crude drawing below to try to help with clarification)

I think what you might need is a “map” variable. it can store 2 variables at once. In this case, you would set the first variable in the map to of the type a Name (whatever one you want), then set the second variable to be of the type Boolean. I have provided screenshots to help. here is the documentation on maps: Blueprint Maps | Unreal Engine Documentation