var results = search.selectNodes("workspace://SpacesStore",
"descendant::*[hasAspect('ia:docFoldered')]");
logger.log("Total
rows " + results.length);
for (var
i = 0; i < results.length; i++)
{
var node = results[i];
var nodename = node.name;
logger.log(nodename);
}
Hope this helps someone.