I have a Discord.js bot, I wanted to make a lockdown command, but my channel ids are stored in a JSON file, and I dont know how to iterate through it. This is the JSON configuration:
{
"channels": {
"main": {
"id": "691548147922763825"
},
"creations": {
"id": "700390086390448148"
},
"fanart": {
"id": "691551615873843211"
},
"memes": {
"id": "691549417173680148"
}
}
}
How can I loop through it? I know that just doing forEach on a JSON file doesnt work, so I need some help.
channelsis not an array.