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

222
Vistas
SyntaxError: Unexpected token r in JSON at position 38

I was unexpected token r in JSON at position 38 for this code.

var object = JSON.parse('{"isFaceboook" : true,"redirectUrl" : redUrl,"facebookId" : id}');

redUrl and id are initialized and they are strings...

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Your variables will need to be stringified as well before it can be parsed.

Something like: '{"isFacebook":true,"redirectUrl":"redUrl","facebookId":4}'

over 4 years ago · Santiago Trujillo Denunciar

0

There's no point to making a JSON string and parsing it:

var object = {
  isFacebook: true,
  redirectUrl: redUrl,
  facebookId: id
};

will work.

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