Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda