I created a simple script to test out working with the Page object. The point of the script is to collect all the pages in the campaign (there are two), and then log the name of each in the Console Output window. Here is the script: log('@@@@@@')
var pagesExist = filterObjs({ _type: 'page'});
_.each(pagesExist, function(page)
{
var pageName = obj.get('name');
log('*** ' + pageName + '***')
});
log('&&&&&&')
When the script runs, it logs the initial "@@@@@@" and the final "&&&&&&" to the Console Output window, but it does not log the name of either of the two pages. Any thoughts on what I am doing wrong with the syntax? Thanks.