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

124
Views
Modulating a json key

i'm right now working with a cocktail API and fetch data out of json. My question is:

Is there a way to rename a json key for example it's original is "strIngredient1" and I want it to be just "strIngredient", so that I can count up to the last key with the same name but changing last number. My idea was to include all objects into one string without doing "ingr1" + "ingr2" + "ingr3" and so on:

var x = 1;

var ingr = data.drinks[0].strIngredient+x;

var ListIngr = "";

do{

x++;

ListIngr.innerHTML =+ ${ingr}

while(ingr != null);

I already searched a lot, but couldn't really find anything.I'm still new to working with Json.

JSON of the API

about 4 years ago · Juan Pablo Isaza
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!