My question is basically in the title.
Is there a way to convert a table passed in from LUA to native JS?
{key:value} objects seem to work alright, but [value, value, value] arrays do not.
Here's an example:
Lua:
{obj = {key = "value"}, str = "string", arr = {1,2,3} }
Calling an environment function..
JS:
{
"obj": {
"__shine": {
"type": "table",
"index": 55,
"keys": [],
"values": [],
"numValues": [
null
],
"refCount": 1
},
"key": "value"
},
"str": "string",
"arr": {
"__shine": {
"type": "table",
"index": 56,
"keys": [],
"values": [],
"numValues": [
null,
1,
2,
3
],
"refCount": 2
}
}
}
What I wanted:
{
"obj": {
"key": "value"
},
"str": "string",
"arr": [
1,
2,
3
]
}
This would obviously need to be done in a recursive manner.
Does a functionality like this exist already?
My question is basically in the title.
Is there a way to convert a table passed in from LUA to native JS?
{key:value} objects seem to work alright, but [value, value, value] arrays do not.
Here's an example:
Lua:
{obj = {key = "value"}, str = "string", arr = {1,2,3} }Calling an environment function..
JS:
What I wanted:
This would obviously need to be done in a recursive manner.
Does a functionality like this exist already?