I have a nested grouping structure that looks something like:
TOP GROUP > NESTED GROUP > (Layers go here)
My goal is to hide and reveal these layers, and I'm able to do this to the top group by using:
app.activeDocument.layerSets.getByName("TOP GROUP").visible = true;
However, whenever I attempt to reach the nested group via the same script I get an error:
Error 1302: No such element
I understand this is because the script is unable to find the nested group due to it not being top-most, as the script will not do any digging to reach it.
That said, is there a simple way to reach a group nested within another group? I understand there are ways to do this using Action Manager, but I would prefer to keep this in JavaScript as I'm at least a little familiar with it while I have no experience at all with Action Manager.