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

136
Views
Unexpected token ' in JSON at position 11

I have an array in string and I want to convert it to array again , But when I use JSON.parse(data) , javascrept gives me this error :

Uncaught (in promise) SyntaxError: Unexpected token ' in JSON at position 11

So how can I convert this string to array or fix this error ?

var data = `[
    ['1','2','3'],
    ['3','4','5','6']
]`;

var d = JSON.parse(data);

I get this data from an api and I can't change ' to "

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

0

In JSON, strings are delimited with " (U+0022 : QUOTATION MARK) characters, only " characters, and never ' (U+0027 : APOSTROPHE) characters.

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!