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

283
Views
Cómo obtener un objeto JSON en el lado del cliente

Actualmente estoy intentando enviar un objeto JSON desde el servidor al cliente, pero no estoy seguro de si estoy accediendo correctamente.

 app.post('/url', function(request, response){ .... var result = fuse.search(); response.json(result); // results should be sent back as a response

} )

 $.post("/url", options, function(response, request) { var json = response.json; )
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

https://api.jquery.com/jquery.post

jQuery.post( url [, data ] [, success ] [, dataType ] )

éxito

Tipo: Función (datos de PlainObject, String textStatus, jqXHR jqXHR)

Una función de devolución de llamada que se ejecuta si la solicitud tiene éxito. Obligatorio si se proporciona dataType, pero puede ser nulo en ese caso.

Si lees más

La función de devolución de llamada exitosa pasa los datos devueltos

Lo que probablemente significa que lo que deberías estar haciendo es

 var json = response;

Esto, por supuesto, asumiendo que su solicitud realmente recibió el JSON

over 4 years ago · Santiago Trujillo 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!