I know this seems like a dumb question but how do I search a lua table for a given item? let’s say I have a table like this:
local table = {
itemA = 0.8,
itemB = 1.2,
itemC = 1
}
Is there, say, a function named table.find or something? It’s also late here so I’m not thinking too clearly at the moment…
You can lookup items in the table either using the
[]operator:or by using the
.operator:Edited because original code is now syntax-correct.