Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda