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

158
Visualizações
get the child element value from first array irrespective of parent element name in JSON

I'm getting below response (snippet) from JSON (for detailed json response hit (GET) https://restcountries.com/v3.1/all in postman or browser)

[
    {
        "status": "officially-assigned",
        "unMember": true,
        "currencies": {
            "KES": {
                "name": "Kenyan shilling",
                "symbol": "Sh"
            }
        }
    }
]

I want to fetch currency name in above json in Oracle Visual Builder irrespective of currency abbreviation like "KES" i must get the currency..name value

I have used below code to fetch currency name value but i'm getting blank value

<oj-table scroll-policy="loadMoreOnScroll" class="oj-flex-item oj-sm-12 oj-md-12"
    data="[[$page.variables.getAllListSDP]]"
    columns='[{"headerText":"Currency","field":"currencies","template":"officialCellTemplate2"}]'>
    <template slot="officialCellTemplate2">
      <oj-bind-text value="[[ $current.data..name"]]"></oj-bind-text>
    </template>
  </oj-table>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

With JSONPath, you should be able to use wildcards to find the name of any currency, assuming the JSON structure of the currencies field is what you have shared.

You'll need to import the JSONPath libraries into your project. The text binding will then become something like this;

<oj-bind-text value="[[ $current.data.[*].name]]"></oj-bind-text>

P.S - I have not tested the behavior of JSONPath with OJet components myself, but theoretically this is how it should 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