So Im trying to get something like this in my json file
- edit:
- Im trying to get the data object to go in my createID statement but I dont know how to make 3 objects that look like my json file in javascript, I looked through many forums and w3school but none show how to make [object: object: object], I tried doing:
playerArea data.[message.author.username]= {usedactivate: 0}
with no luck because its incorrect I dont know how to make this statement and I require help its been 2 days working on this small code of how to make [object: object: object] and Im really fusterated…
A simple example of how to add data object to [message.author.username] would be gladly apprieciated. Example help…
The issue im having is I need to get fs.readFile to read my data but I cannot call it to read [message.author.username] so I need to make a data object to hold the player usernames then call fs.readFile to read “data”.
{
"data": {
"♡Yuzi♡": {
"usedactivate": 0
}
"Cytonic": {
"usedactivate": 0
}
}
}
From Something like this:
- playerArea is the json file
- [message.author.username] is the username of player
- createID is empty {}
if(playerArea[message.author.username] === undefined) {
createID [message.author.username] = {
registy: usedactivate: 0
}