Answered
how to add layers in master page and move contents to it in indesign using javascript
app.documents[0].layers.add ({name: 'A', layerColor: UIColors.RED});
app.documents[0].layers.item('Layer 1').name = 'B';
var currentItem = app.activeDocument.pageItems.item(0);
currentItem.move(app.documents[0].layers.item('A'));
//app.documents[0].masterSpreads[0].layers.add(); //this property is not available
How to add new layer in masterSpreads[0] and move masterPage contents to that layer. I did it in pages but unable to do it with masterpage. If there is anyway help me out!
