UiPath Variables - Get variable's value from a string

If you use the RE Framework to create your process it comes with a config file which does just that.

You enter a string value as the variable title and the content is picked up as an object. All variables in the config file are stored in a dictionary (string, object) variable for use throughout your process

https://forum.uipath.com/t/how-to-create-config-file-and-how-to-use-it-in-uipath/33619