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

121
Visualizações
JavaScript Object Property Includes SPACE Character

I'm working in VS Code on a VueJS 3 project. I have Vetur Extension (version: v0.35.0) installed for error checking and syntax highlighting. I'm getting notified by red tick mark and output in the Problems window about the format of how I'm identifying Object Properties that include a space character in their definition. Here is an example:

    this.ncCases = this.store.state.csvJson.data.filter(obj => {
        return obj.[`Neighborhood Council`] == this.selectedNC
    })

The property "Neighborhood Council" includes a space. I found a reference at mozilla.org that describes enclosing these properties within Square Brackets. However, when I do this, I get the Red Error Market of death.

Identifier expected. Vetur(1003)

Must say the code runs without error so I think the problem is Vetur Extension does not recognize this syntax. Never the less, it would be nice to fix the code to not generate the error or fix Vetur to not display a false positive error.

Any suggestions?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

this.ncCases = this.store.state.csvJson.data.filter(obj => {
        return obj['Neighborhood Council'] == this.selectedNC
    })

This should be fine in order to get access to the property

Maybe this response could help you in order to disable some checks here

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