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

155
Views
How to get the value of the Promise after it is resolved in node REPL

I have some code like this which I am trying in Node REPL:

result = lib.utils.kv["@0.1.16"]
    .get({ key: "t2" });

Now I want to access the value in the string after it is resolved. When I try to print result, I first get Promise { <pending> }

Then after sometime, I get

Promise {
        `'{"locations":{"CH":5000013960,"AE":5000013961,"AF":5000013961}}'`
}

I want to get the output without the Promise prefix, and also ideally without that backtick.

I have tried to use an alternative syntax, but not sure whether this is the only way and whether this is even the right way?

(async () => {
  result = await lib.utils.kv["@0.1.16"]
    .get({ key: "t2" });
  console.log(result);
})();
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!