i have object with array of names koktelData.strIngredient1 to 15 and values. I want loop that array and create new array with all values from koktelData.strIngredient1 to 15. I tray something like this but new array have 15 elements undefined1 to undefined15.
var sastojak = koktelData.strIngredient;
let sastojci = [];
for (let i = 1; i < 16; i++) {
var sastojak_niz = koktelData.strIngredient + [i];
const sastajak = sastojci.push(sastojak_niz);
}
console.log(sastojci);