【发布时间】:2020-05-28 10:18:16
【问题描述】:
我将如何获得一个 for 循环来循环 nodejs 中 config.json 文件中的内容量。例如
我想要它做什么:
const auth = require("./tokens.json")
//other code here
for tokens in auth {
client.login(token)
}
我的 tokens.json 会是这样的
"Tokens": ["xxxxxx",
"xyxyxx",
"asdasdaf",
"etc"]
【问题讨论】:
标签: javascript node.js json for-loop bots