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

168
Visualizações
Indexing a JSON by index instead of key?

I'm given some JSON object from a site I need to pull some information from. It's giving to to me in a form like:

{   "status": true,   
"number_of_things": 2,   
"things": {
    "SOMETHING I DONT KNOW 1": {
      "meta": {
        "description": "DESCRIPTION OF THING1"
      },
      "status": {
          "in_current_state_since": "2021-09-14T00:11:09Z",
        "minutes_in_current_state": 8798
      }
    },
    "SOMETHING I DONT KNOW 2": {
      "meta": {
        "description": "DESCRIPTION OF THING2"
      },
      "status": {
          "in_current_state_since": "2021-09-14T00:11:09Z",
        "minutes_in_current_state": 8798
      }
    }   } }

I want to try and get the description field but I don't know or care about the "something i don't know" keys. is there a way to index it like
myParsedJSON.things[index].meta.description ?

I basically want to index through all of the "things" and print out the description of each. so look "number of things" times.

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