Page 1 of 1

Lua and tab separated values

Posted: Wed Aug 10, 2022 11:32 pm
by darkfrei
Hi all!

I want to save some data as

Code: Select all

tablData = {	-- table of values
		b="yes",
		d="text",
		c=false,
		a=true,
		e={2, 3, 4, true, "text"}, -- list of values
		[1]=1,
		[2]=true,
		[3]=false,
		[4]="text",
		true="yes",
		false="no",
	}
to the .TSV (tab separated values):

Code: Select all

1	1
2	true
3	false
4	text
b	yes
true	yes
false	no
d	text
c	true
a	true
e	2	3	4	true	text

and here is an example how to do it:
save-tsv-01.love
cc0 / “No Rights Reserved”
(1.9 KiB) Downloaded 167 times