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

137
Vistas
Converting JSON data received from ajax call to an array

I am getting data in JSON format from an ajax call. I want to convert it into an array to be used in the js script.

 {
  "results":[
  {
     "activity":"A12345"
  },
  {
     "activity":"B12345"
  }]}

Array that I want to have

arr = ["A12345", "B12345"]

I tried the following steps -

var response = JSON.parse(data); 
var arr = response`enter code here`.results; 
var newArr = Object.entries(arr);
alert("New" + Object.values(arr));

The result that I am getting is

[object Object], [object Object]

How can I get the values from these objects and store it in an array. Please help!

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