I want to select all layers in my project with the name “.note”, so I have this code:
documentRoot.children.forEach(node => {
if (node instanceof Artboard) {
let artboard = node;
let notes = artboard.children.filter(artboardChild => {
return artboardChild.name == ".note";
})
notes.forEach(note => {
//do stuff
})
}
})
The problem is that if I have a layer “.note” that is inside a group, it is not selected. How can I select ALL layers with this name, even if it’s inside a group?