title: Return specific value of all objects in an array
body: <p>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.</p>
  
  <p>What am I missing?</p>
  
  <pre><code>function loadCategories(id){
     for (var i = 0; i&lt;folder.grades.models.length; i++){
        if(folder.grades.models[i].attributes.entityid==id) {
           return folder.grades.models[i].attributes.categories.category[i].name;
        }
     }
  }
  </code></pre>