Check if Table contains a value in lua
问题 I am looking for a method to see if the value is in array (table) The example table has 3 entries, each entry containing a table with multiple entries Say I am checking if 'apple' is in 'data' data = { {"alpha","bravo","charlie","delta"}, {"apple","kiwi","banana","pear"}, {"carrot","brocoli","cabage","potatoe"} } This is the code I have, a recursive query. The problem is the function breaks somewhere as it drops the positive value local function hasValue(tbl, str) local f = false for ind, val