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

89
Views
Javascript decoding unicode returns `undefined`

I have this two different unicodes in my .Json file:

\u30a2\u30eb\u30d0
\u0410\u043d\u0433\u0438\u043b\u044c\u044f 

Javascript code uses const data = require('./countries.json'); to access this .Json file and extract this values. But, it can only decode second one, for the first one it returns undefined error. Can anyone explain me why?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I don't know how you access those values, but I've recreated your scenario and it does work like expected.

Here my values.json

{
  "official": "\u30a2\u30eb\u30d0",
  "common": "\u0410\u043d\u0433\u0438\u043b\u044c\u044f"
}

Here my Node code

const values = require("./values.json");
console.log(values.common);
console.log(values.official);

Expected output:

Ангилья
アルバ

I can only guess that you are trying to access a value with a key that does not exist or you are missing quotes.

about 4 years ago · Juan Pablo Isaza Report
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!