I'm try to use Lua table instead of SQLite, I've got a problem.
Case here:
I wanna search for some specific key inside.
By this table, If I only got 1 information, Location = "Center", how can I search back which Code of this area?
For example, "Search Location "Center" and then return the code "yz01"....that is what I want to get, but don't know how to do it in Lua, Thanks.
Case here:
I wanna search for some specific key inside.
require("tprint")
Map = {}
Map.sz = {}
Map.sz.sz01 = { Code = "sz01",
Area = "sz",
Location = "Tower",
CP = 1,
Range = 3,
}
Map.sz.sz02 = { Code = "sz02",
Area = "sz",
Location = "Hotel",
CP = 0,
Range = 4,
}
Map.yz = {}
Map.yz.yz01 = { Code = "yz01",
Area = "yz",
Location = "Center",
CP = 1,
Range = 3,
}
tprint(Map)
By this table, If I only got 1 information, Location = "Center", how can I search back which Code of this area?
For example, "Search Location "Center" and then return the code "yz01"....that is what I want to get, but don't know how to do it in Lua, Thanks.