Create list of parts in ComboBox

• Aug 11, 2020 - 14:39

Looping over score's parts seems to be the best way to retrieve all staff's names in order to display them in a ComboBox (which does not work yet...).

I try this:

var staffList
for (var i = 0; i < score.parts.length; i++) {
  staffList.push({id: i, partName: score.parts[i].partName}
}

// this only prints [Object object]
console.log(staffList.length)

How do I have to define and shape the array in order to be able to assign it to a ComboBox?

Thank you!


Comments

Do you still have an unanswered question? Please log in first to post your question.