-- Only included if `pxs_utils` feature set. This goes into GLOBAL scope.
function_pxs_items(t)-- Get keys and values of a table and return them
-- as a table list of {{key, item}, ...}
localitems={}localkeys={}forkeyinpairs(t)dotable.insert(keys,key)endtable.sort(keys)-- Sort keys to ensure consistent order
for_,keyinipairs(keys)dotable.insert(items,{key,t[key]})endreturnitemsend