
local testTabel = {
a = "testSuccessed",
b = 1,
c = 2
}
function GetNodeWithKey(t, k)
return t[k]
end
local data = GetNodeWithKey(testTabel,"a")
print(data)
以上就是关于求lua中根据table的键值取出相应数据的算法。全部的内容,包括:求lua中根据table的键值取出相应数据的算法。、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)