Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!