Hello, Today, I was working on a script that would help me save ID's, assets, and whatever else that I might want to save.
I'm looking for a way to turn variable into a button. i.e I'm trying to make this
local table =
{
["ItemB"] = {
Text = 'Test Something'
}
["ItemA"] = {
Text = 'Something else'
}
["ItemS"] = {
Text = 'IDK'
}
}
Into three buttons in alphabetical order, that when you click, prints the string in their respective "Text"
If you know how I may achieve this, it would be nice if you could leave a answer. I am still new to scripting so I apologize if these questions and terminology are cringeworthy.
Thanks!

2 comments
Well you can only sort arrays and you have a dictionary, so you need some representation of your data in array form, be it just the keys to index the table you have or the items themselves. Then you can use the table.sort function, together with you your own sorting criteria.
^ So... something like local table = {} table.info {{"Name", Text}}?