Top "Lua-table" questions

This tag refers to the table type in Lua that implements associative arrays.

Iterating through a Lua table from C++?

I'm trying to load tables from Lua to C++ but I'm having trouble getting it right. I'm getting through the …

c++ lua lua-table
How to iterate Lua table from end?

How do I iterate a simple Lua table, that is a sequence, from end? Example of wanted behavior: local mytable = {…

lua iterator reverse lua-table
How to load text file into sort of table-like variable in Lua?

I need to load file to Lua's variables. Let's say I got name address email There is space between each. …

file lua load lua-table
How to create nested Lua tables using the C API

I want to create a table like myTable = { [0] = { ["a"] = 4, ["b"] = 2 }, [1] = { ["a"] = 13, ["b"] = 37 } } using the C API? My current approach is …

c++ lua lua-table lua-api
Sorting a Lua table by key

I have gone through many questions and Google results but couldn't find the solution. I am trying to sort a …

sorting lua key lua-table
Pushing a Lua table

I have created a Lua table in C, but I'm not sure how to push that table onto the top …

c++ c lua stack lua-table
Lua : remove duplicate elements

i am having a table in lua test = {1,2,4,2,3,4,2,3,4,"A", "B", "A"} I want to remove all duplicate elements in table. …

lua lua-table
method for serializing lua tables

I may have missed this, but is there a built-in method for serializing/deserializing lua tables to text files and …

serialization lua coronasdk lua-table
Torch: How to shuffle a tensor by it's rows?

I am currently working in torch to implement a random shuffle (on the rows, the first dimension in this case) …

lua permutation lua-table torch tensor
How to keep the order of a Lua table with string keys?

Here's an example local query = {} query['count'] = 1 query['query'] = 2 for k,v in pairs(query) do print(k) end The …

lua lua-table