The following code returns only the "name" of the first item in the array "category". However I need it to return the "name" value of each item in the array.
What am I missing?
function loadCategories(id){
for (var i = 0; i<folder.grades.models.length; i++){
if(folder.grades.models[i].attributes.entityid==id) {
return folder.grades.models[i].attributes.categories.category[i].name;
}
}
}
ias an index into bothmodelsandcategory?