AnsweredAssumed Answered

iterate a collection in WCMQS

Question asked by michaelc on Jul 29, 2013
Latest reply on Jul 30, 2013 by michaelc
So I have a need in the JavaScript layer to pull a value from a collection and then split it.

Problem is I can't seem to figure out how to iterate the collection itself.

at the Freemarker level I do the following.

   <#list articles.assets as article>   
         <li><a href="<@makeurl asset=article force='long'/>">${article.title!}</a></li>
         <#assign desc =["cm:description"]>

So I would expect at the javascript level I could.

      model.articles = collectionService.getCollection(, args.collection);
      var colItr = model.articles.assets.iterator();
      while(itr.hasNext() ) {
         itemObj =;
         var itemRow = new Object();
         itemRow.region =['cm:name'];
         itemRow.description =['cm:description'];
      model.items = itemArray;

but this does not give me any result.
So how do I iterate a wcmqs collection ?