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

167
Vistas
Ajax responseText parsing to undefined

I'm trying to read a return body of a POST ajax call. It's returning an object "message" with a pair value regarding its price.

For some reason when I try to retrieve the "message"'s value I get undefined. I have tried a few methods including JSON.parse.

I don't want to simply string.replace out the content from the raw string as that would be a messy and ineffective solution.

In this specific example I am trying to retrieve "Please deposit: 1.50"

My function:

.always(function(returnBody){
console.log("raw: " + returnBody.responseText);

var parsed = JSON.parse(returnBody.responseText);
var item = parsed[0];

console.log("stringified: " + JSON.stringify(item));

My log content:

raw: {"message":"Please deposit: 1.50"}
stringified: undefined
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