Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

164
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda