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

228
Vistas
JQuery - AJAX - How to access the content of response?

My AJAX call keeps returning response object instead of the expected value

  function check_now(word)
    {
           var x =  $.ajax({
            url: "{% url 'checker' %}",
            data: {
                   'word': word,
                   'csrfmiddlewaretoken': '{{ csrf_token }}',
                    },
            async:false,
            type: "POST",
            dataType: 'json',
            statusCode: {
                 200: function (response) {
                      console.log(response.is_command);
                      return response.is_command;
                        }
                 }
        });
        return x;
    }

Expected result is a boolean. Output of console.log(response.is_command) is printed correctly as false. But returned value x is still an object. I can't access the is_command. How to access it?

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