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

161
Vistas
how to manipulate a custom attribute 'custom:variable_name' in Javascript

So, using AWS Cognito I created a custom attribute (special_name) which I can access using axios and AWS's Auth.currentUserInfo(). Using my browser's JavaScript console I can see the variable as:

attributes: custom:special_name: 'foo'

Great.

But if I console.log(custom:special_name) I get errors or at best 'undefined'

I'm using Visual Studio Code which really doesn't like the format custom:special_name.

I've already searched on this site and the ideas given, e.g. ['custom: special_name'] also don't work.

I feel like I'm missing something very obvious.

Please put me out of my misery.

Thanks.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

But if I console.log(custom:special_name) I get errors or at best 'undefined'

Did you mean:

attributes['custom:special_name']

It seems your variable is a member of the attributes object, not a global one. In that case, the square bracket syntax will work.

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