title: Check if user has a data for Economy Bot discord.js
body: <p>Heyo, I'm coding on an Economy-System right now but I have a problem.
  I have to check if the user has data and if he doesn't have data create it.
  Here is what I've done:</p>
  <pre><code>if (UserJSON.user[message.author.id]) { //It doesn't detect the message.author.id
    console.log(&quot;User Data already exists&quot;);
    return;
  } else {
      const newUser = {
        user: message.author.id,
        stats: {
          money: 0
        }  
      }
      UserJSON.push(newUser);
      fs.writeFileSync(&quot;./data/users.json&quot;, JSON.stringify(UserJSON, null, 2));
  }
  </code></pre>
  <p>The writing data function works perfectly as you can see down here in the users.json</p>
  <pre><code>[
    {
      &quot;user&quot;: &quot;654022997983756328&quot;,
      &quot;stats&quot;: {
        &quot;money&quot;: 0
      }
    },
    {
      &quot;user&quot;: &quot;917065319724507176&quot;,
      &quot;stats&quot;: {
        &quot;money&quot;: 0
      }
    }
  ]
  </code></pre>
  <p>The only problem is &quot;check if the user has data&quot;
  It doesn't detect</p>
  <pre><code>[message.author.id]
  </code></pre>
  <p>Someone told me to do</p>
  <pre><code>if (UserJSON.[message.author.id].user) {
  </code></pre>
  <p>but sadly it didn't work too.
  Can anyone help me here fix this issue?</p>