Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
Read undifined variable out of json file

i am right now trying to program a Discord bot currencysytem that is saved in a .json file. How its saved looks like this:

"<userid>" : <currency>, "userid" : <currency>, ...

And i try to get the data out of it looks like this:

const currency = require('../currency.json');
    let fs = require('fs')
    let an = message.author.id

    message.channel.send(currency.{an}); // !!here I need help!!

    
 

In the line where i wrote "// !!I need help here!! i want to use the variable "an" and the visuial studio code doesnt get it... Does anyone has a solution to my problem pls help me. Thx you <3

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!