Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] I don't know the first thing about LUA or its types. I'm just trying to export a LUA table to JSON

[DiscordArchive] I don't know the first thing about LUA or its types. I'm just trying to export a LUA table to JSON

[DiscordArchive] I don't know the first thing about LUA or its types. I'm just trying to export a LUA table to JSON

rektbyfaith
Administrator
0
09-11-2021, 05:01 PM
#1
Archived author: rannmann • Posted: 2021-09-11T17:01:41.143000+00:00
Original source

I don't know the first thing about LUA or its types. I'm just trying to export a LUA table to JSON and ran into an issue.

I have the big table Auctioneer generates in a variable, and the primary data I need is in some weird value I don't understand:

```
["image"] = "rope",
["ropes"] = {
"return {{\"|cff9d9d9d|Hitem:33430:0:0:0:0:0:0:0:80|h[Abandoned Greatsword]|h|r\",125,\"Weapon\",\"Two-Handed Swords\",17,57715,4,1629693707,\"Abandoned
```

The `ropes` table starting with `return` is something I don't know how to handle. How do I actually call `data["ropes"]` to get the value it returns rather than the string starting with the word `return`?
rektbyfaith
09-11-2021, 05:01 PM #1

Archived author: rannmann • Posted: 2021-09-11T17:01:41.143000+00:00
Original source

I don't know the first thing about LUA or its types. I'm just trying to export a LUA table to JSON and ran into an issue.

I have the big table Auctioneer generates in a variable, and the primary data I need is in some weird value I don't understand:

```
["image"] = "rope",
["ropes"] = {
"return {{\"|cff9d9d9d|Hitem:33430:0:0:0:0:0:0:0:80|h[Abandoned Greatsword]|h|r\",125,\"Weapon\",\"Two-Handed Swords\",17,57715,4,1629693707,\"Abandoned
```

The `ropes` table starting with `return` is something I don't know how to handle. How do I actually call `data["ropes"]` to get the value it returns rather than the string starting with the word `return`?

rektbyfaith
Administrator
0
09-11-2021, 05:02 PM
#2
Archived author: rannmann • Posted: 2021-09-11T17:02:09.303000+00:00
Original source

Unfortunately I know so little about lua that I'm not even sure what to google
rektbyfaith
09-11-2021, 05:02 PM #2

Archived author: rannmann • Posted: 2021-09-11T17:02:09.303000+00:00
Original source

Unfortunately I know so little about lua that I'm not even sure what to google

rektbyfaith
Administrator
0
09-11-2021, 05:26 PM
#3
Archived author: rannmann • Posted: 2021-09-11T17:26:19.279000+00:00
Original source

ah, `load()` was the answer
rektbyfaith
09-11-2021, 05:26 PM #3

Archived author: rannmann • Posted: 2021-09-11T17:26:19.279000+00:00
Original source

ah, `load()` was the answer

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)