'Three js get child object from imported model

I imported a 3D model which has a few child objects and now I would like to get a specific child mesh.

When I use .getObjectByName("Cylinder", true) I always get undefined back, although the model has a child object with the specifed name:

enter image description here

Is there a way to get the child object?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source