<Andreas.Volz@elektrobit.com> writes:
lua_newtable(L); // table
The previous reply shows how you can replace "a" with a new table constructed by your array2table function. If you want to simply edit the existing "a", just don't create a new table (remove the line quoted above), rather use the existing table on the stack.
Hope that helps,
James.