Finding data in scriptable objects based off their name

I have a rather strange question but essentially I want to be able to assign a Scriptable Object object to a variable in another script, say I have a list of strings and I want to call one of these strings and find the Scriptable Object with the same name and assign it to a local variable.
Say I had a list of strings for names “sword”, “apple”, “potion” and I had a script that had an inventory and if I clicked on an object assigned “potion” it would find the stats found within the apple Scriptable Object and use those for whatever irrelevant reason comes after.

update: figured it out myself, too new to this forum to know how to mark this thread as irrelevant

I would avoid using strings in this manner as they are less performant than other options and make it harder for your IDE to give you important usage information among other issues. I would recommend using an enum for the items and use a dictionary with the enum as the keys and the scriptable objects as the values.

Why don’t you use the SOs themselves instead of strings? So you don’t need to translate strings to SOs. If you need to display them to the user you can have a displayName in the SO for that purpose.