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

150
Views
How to convert array of objects from string to normal array of objects

I have array of objects in string format I want to convert it into normal array of objects. I have used JSON.parse() to convert it but when I am trying to get the value like: this.contact_data[0].data.value it shows undefined.

It's my array of objects:

contact_data.data='[{'name':"Number",'value':"22222222"},{'name':"gmail",'value':"xyz@gamil.com"}]'
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The key in the array of objects after stringify should be in double quotes like " but this is in single quotes ' that's why it will not parse

'[{"name":"Number","value":"22222222"},{"name":"gmail","value":"xyz@gamil.com"}]' this is correct stringify array which will parse

'[{'name':"Number",'value':"22222222"},{'name':"gmail",'value':"xyz@gamil.com"}]' and this is you array

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!