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

208
Visualizações
can not access id items in a nested objects

I'm getting the keys returned (0,1..) but can not access the value of _text This is my data, of type object the IdList is an object : IdList: {Id: Array(6)} I'm having the keys but can not access the value of _text

IdList: {Id: Array(6)}


Id: Array(6)
0: {_text: '34983115'}
1: {_text: '34983114'}
2: {_text: '34983113'}...
query 
{_declaration: {…}, _doctype: '', eSearchResult: {…}}
eSearchResult:
Count: {_text: '203374'}
IdList:
Id: Array(6)
0: {_text: '34983115'}
1: {_text: '34983114'}
2: {_text: '34983113'}
3: {_text: '34983112'}
4: {_text: '34983111'}
5: {_text: '34983110'}

length: 6
[[Prototype]]: Array(0)
[[Prototype]]: Object

I stored the data in an object state named query

const [query, setQuery] = useState({});

Then tried to access the id in the idlist: the output of this code is index , index._text is undefined

 {Object.keys(query).length &&
        Object.keys(query.eSearchResult.IdList.Id).map((keyName, index) => {
          return (
            <div className="card bg-c-blue order-card">
              <div className="card-block" keyy={index}>
                 {index}
                {index._text}
              </div>
            </div>
          );
        })}
about 4 years ago · Juan Pablo Isaza
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