I have a table that is the result of a json parser and I want to extract all the keys and values from that table as well as the tables within it. How do I do that?
Example:
t = {
a = {
1,
b = {2, 3},
4,
},
c = {5, 6, 7}
}
result = extract(t) --result = a=(1, 4) b=(2, 3) c=(5, 6, 7)